angularjs - Angular 2 : AOT TypeError: base64 is not a function

标签 angularjs angular

我正在尝试使用 aot 编译我的项目,但是当我尝试命令时

ngc -p tsconfig-aot.json

它第一次使用 ngFactroy 生成 aot 文件夹,但是当我更改主 ts(如 Angular 文档中所述)以引导新生成的 ngmodulefactory 并使用相同的命令重新编译项目时 我收到以下错误

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

我做错了什么吗?

最佳答案

我找到了答案,它的节点 js 在这里做问题,AOT 需要节点 js v6+,我只是更新我的节点并修复问题,如果有人遇到这个问题,只是发布我的答案。

关于angularjs - Angular 2 : AOT TypeError: base64 is not a function,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43275778/

相关文章:

javascript - 选择选项 Angular、PHP 和 mysql

javascript - 如何在 AngularJS 中外部配置工厂

javascript - 为什么一篇帖子的评论会出现在所有帖子中?

angularjs - "Cross-origin-request blocked"。如何克服呢?

angular - ngModel 未正确绑定(bind)

javascript - ionic 本地通知删除对话框

javascript - 如何编辑源自超链接(<a href> 标记)的 HTTP GET 请求的授权 header

Angular 2 应用程序因 XHR 错误而失败(404 未找到)

Angular Material Datepicker 获得变化的值(value)

angular - 如何在 [(ngModel)] 中使用 Map()?