如何修复Angular 2错误的node_modules/@types/systemjs/index.d.ts(333,13)?

问题描述:

我已经克隆了一只角2项目和已安装的所有要求,但在运行ng serve命令时,我有一个node_module错误:如何修复Angular 2错误的node_modules/@types/systemjs/index.d.ts(333,13)?

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",。这与兼容性有关吗?我怎样才能解决这个错误?谢谢。

+0

尝试从package.json中删除'@ types/systemjs' –

+0

或者在您的项目中搜索'declare var System'。看来,你已经在项目中声明了var System:any'代码 –

查找最后更新systemjs,并通过NPM安装,更改的package.json版本,然后取出node_modules文件夹并键入sudo npm install