ngc 编译错误为 typings/index.d.ts' not found
ngc compilation error as typings/index.d.ts' not found
我已经从以下 github 下载了 Tour Of Heroes 应用程序。
我已经成功 运行 应用 npm start
但是当我尝试 运行 npm run start-aot
然后我收到以下错误。
angular2-tour-of-heroes@0.1.0 start-aot D:\angular2-to
ur-of-heroes-master
npm run aot && npm run rollup && gulp copy-aot && npm run lite
angular2-tour-of-heroes@0.1.0 aot D:\angular2-tour-of-
heroes-master
ngc -p tsconfig-aot.json
Error: Error File 'D:/angular2-tour-of-heroes-master/typ
ings/index.d.ts' not found.
at Object.check (D:\angular2-tour-of-heroes-master\n
ode_modules\@angular\tsc-wrapped\src\tsc.js:31:15)
at Object.main (D:\angular2-tour-of-heroes-master\no
de_modules\@angular\tsc-wrapped\src\main.js:26:15)
at Object.<anonymous> (D:\angular2-tour-of-heroes-ma
ster\node_modules\@angular\compiler-cli\src\main.js:16:9)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.runMain (module.js:604:10)
at run (bootstrap_node.js:394:7)
Compilation failed
在package.json下面是依赖
"dependencies": {
"@angular/common": "~2.1.0",
"@angular/compiler": "~2.1.0",
"@angular/compiler-cli": "^2.1.2",
"@angular/core": "~2.1.0",
"@angular/forms": "~2.1.0",
"@angular/http": "~2.1.0",
"@angular/platform-browser": "~2.1.0",
"@angular/platform-browser-dynamic": "~2.1.0",
"@angular/platform-server": "^2.2.1",
"@angular/router": "~3.1.0",
"@angular/upgrade": "~2.1.0",
"angular-in-memory-web-api": "~0.1.5",
"core-js": "^2.4.1",
"reflect-metadata": "^0.1.8",
"rxjs": "5.0.0-beta.12",
"systemjs": "0.19.39",
"zone.js": "^0.6.25"
}
AoT 问题现已修复。有关更多信息,请参阅 here。最简单的做法是再次克隆存储库。
我已经从以下 github 下载了 Tour Of Heroes 应用程序。
我已经成功 运行 应用 npm start
但是当我尝试 运行 npm run start-aot
然后我收到以下错误。
angular2-tour-of-heroes@0.1.0 start-aot D:\angular2-to
ur-of-heroes-master
npm run aot && npm run rollup && gulp copy-aot && npm run lite
angular2-tour-of-heroes@0.1.0 aot D:\angular2-tour-of-
heroes-master
ngc -p tsconfig-aot.json
Error: Error File 'D:/angular2-tour-of-heroes-master/typ
ings/index.d.ts' not found.
at Object.check (D:\angular2-tour-of-heroes-master\n
ode_modules\@angular\tsc-wrapped\src\tsc.js:31:15)
at Object.main (D:\angular2-tour-of-heroes-master\no
de_modules\@angular\tsc-wrapped\src\main.js:26:15)
at Object.<anonymous> (D:\angular2-tour-of-heroes-ma
ster\node_modules\@angular\compiler-cli\src\main.js:16:9)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.runMain (module.js:604:10)
at run (bootstrap_node.js:394:7)
Compilation failed
在package.json下面是依赖
"dependencies": {
"@angular/common": "~2.1.0",
"@angular/compiler": "~2.1.0",
"@angular/compiler-cli": "^2.1.2",
"@angular/core": "~2.1.0",
"@angular/forms": "~2.1.0",
"@angular/http": "~2.1.0",
"@angular/platform-browser": "~2.1.0",
"@angular/platform-browser-dynamic": "~2.1.0",
"@angular/platform-server": "^2.2.1",
"@angular/router": "~3.1.0",
"@angular/upgrade": "~2.1.0",
"angular-in-memory-web-api": "~0.1.5",
"core-js": "^2.4.1",
"reflect-metadata": "^0.1.8",
"rxjs": "5.0.0-beta.12",
"systemjs": "0.19.39",
"zone.js": "^0.6.25"
}
AoT 问题现已修复。有关更多信息,请参阅 here。最简单的做法是再次克隆存储库。