我正在尝试在AOT Range2项目中使用这编译器。我得到错误:TypeError: this.compiler.compileModules不是一个函数,当我执行命令:"node_modules/.bin/ngc" -p tsconfig-aot.json。如何解决这个问题?
复制步骤:
src/app/+detail目录和detail路由器从src/app/app.routes.ts中删除(我这样做是因为"node_modules/.bin/ngc" -p tsconfig-aot.json输出错误:can't resolve module src/app/+detail/index.ts from src/app/+detail/index.ts)tsconfig-aot.json:
{ "compilerOptions":{“目标”:"es5“、”模块“:"es2015”、"moduleResolution":“节点”、"sourceMap":true、"emitDecoratorMetadata":true、"experimentalDecorators":true、"removeComments":false、"noImplicitAny":true、"suppressImplicitAnyIndexErrors":true },
"angularCompilerOptions":{ "genDir":"aot","skipMetadataEmit“:true }"node_modules/.bin/ngc" -p tsconfig-aot.json发布于 2016-11-04 13:19:41
我只是遇到了相同的问题,并通过确保“@转角/编译器”:"2.1.1“和”@转角式/编译器-cli“使用相同的版本号来解决这个问题。例如,“@角/编译器-cli”应该是"2.1.1“,以匹配编译器版本。
https://stackoverflow.com/questions/40407132
复制相似问题