我试图用aot编译我的项目,但是当我尝试命令时
ngc -p tsconfig-aot.json
它第一次使用ngFactroy生成aot文件夹,但是当我为引导新生成的ngmodulefactory更改主ts (在角文档中提到)并使用相同的命令重新编译项目时,我将得到以下错误
TypeError: base64 is not a function
at Function.from (native)
at Function.from (native)
at Object.extractInlineSourceMap (/Users/apache-tomcat-7.0.61/webapps/ChatAppAngular/node_modules/tsickle/build/src/source_map_utils.js:33:19)
at TsickleCompilerHost.stripAndStoreExistingSourceMap (/Users/apache-tomcat-7.0.61/webapps/ChatAppAngular/node_modules/tsickle/build/src/tsickle_compiler_host.js:128:48)
at TsickleCompilerHost.getSourceFile (/Users/apache-tomcat-7.0.61/webapps/ChatAppAngular/node_modules/tsickle/build/src/tsickle_compiler_host.js:89:25)
at findSourceFile (/Users/apache-tomcat-7.0.61/webapps/ChatAppAngular/node_modules/typescript/lib/typescript.js:63453:29)
at processImportedModules (/Users/apache-tomcat-7.0.61/webapps/ChatAppAngular/node_modules/typescript/lib/typescript.js:63600:25)
at findSourceFile (/Users/apache-tomcat-7.0.61/webapps/ChatAppAngular/node_modules/typescript/lib/typescript.js:63481:17)
at processSourceFile (/Users/apache-tomcat-7.0.61/webapps/ChatAppAngular/node_modules/typescript/lib/typescript.js:63384:27)
at processRootFile (/Users/apache-tomcat-7.0.61/webapps/ChatAppAngular/node_modules/typescript/lib/typescript.js:63271:13)
Compilation failed我做错什么了吗?
发布于 2017-04-10 06:31:47
我找到了答案,它的节点js在这里做问题,AOT需要节点js v6+,我只是更新我的节点并解决问题,如果有人面临这个问题,只需发布我的答案。
发布于 2017-04-09 07:51:38
这似乎是一个已知的问题,请查看下面的链接https://github.com/angular/angular-cli/issues/5711
https://stackoverflow.com/questions/43275778
复制相似问题