我已经克隆了一个 angular 2 项目并安装了所有要求,但在运行 ng serve
命令时,我有一个node_module错误:
node_modules/@types/systemjs/index.d.ts (333,13): Subsequent variable declarations must have the same type. Variable 'System' must be of type 'any', but here h as type 'System'.
在我的package.json
,我有"@types/systemjs": "^0.19.32",
。这与兼容性有关吗?如何修复此类错误?谢谢。
查找 systemjs 的最新更新并通过 npm 安装它,更改 package.json 中的版本,然后删除node_modules文件夹并键入 sudo npm install
。