Angular2 AOT编译器错误,重复标识PropertyKey

时间:2017-01-19 18:47:54

标签: angular systemjs aot angular2-aot

我正在编译我在这里描述的angular2项目AA: https://angular.io/docs/ts/latest/cookbook/aot-compiler.html

我运行以下命令:node_modules / .bin / ngc -p tsconfig-aot.json

但是在收到以下错误时: node_modules / typescript / lib / lib.es2015.core.d.ts:17:14:重复标识符'PropertyKey'。

Domeinen有任何想法锄头修复organisatie锄头发现这里是多次申报?

谢谢!

1 个答案:

答案 0 :(得分:0)

我自己解决了。问题出在我正在使用的de typings。我以不同的方式安装了一堆打字机。那我做了什么。

  • 从项目中删除typings文件夹和typings.json文件
  • 从packages.json中删除任何类型的dependecies,期望以下2:
  • @ types / jasmine和@ types / node,如果您不知道可以使用以下命令安装它们的版本: npm install @types/jasmine --save-dev and npm install @types/node --save-dev
  • 之后我用aot重新编译并且错误消失了我有一些其他缺少的打字并且我用@types安装它们,我认为不使用除@types之外的其他命令很重要。