angular - Angular 生产版本中的无效或意外令牌错误
问题描述
chunk {0} runtime.06daa30a2963fa413676.js, runtime.06daa30a2963fa413676.js.map (runtime) 1.5 kB [entry] [rendered]
chunk {1} main.9868d9b237c3a48c54da.js, main.9868d9b237c3a48c54da.js.map (main) 182 bytes [initial] [rendered]
chunk {2} polyfills.85f47f0bf59079cbc23a.js, polyfills.85f47f0bf59079cbc23a.js.map (polyfills) 189 bytes [initial] [rendered]
chunk {3} styles.da6a8dc1b4027cfd731e.css, styles.da6a8dc1b4027cfd731e.css.map (styles) 338 kB [initial] [rendered]
ERROR in Invalid or unexpected token
我收到上述错误消息
ng build --prod
在其他机器上,构建工作。此外,调试构建(ng serve)也可以工作。错误消息没有提供关于从哪里开始搜索的线索。此错误的原因是什么和/或如何识别它?
这是一些版本信息:
Angular CLI: 6.0.8
Node: 6.8.0
OS: win32 x64
Angular:
...
Package Version
------------------------------------------------------
@angular-devkit/architect 0.6.8
@angular-devkit/core 0.6.8
@angular-devkit/schematics 0.6.8
@schematics/angular 0.6.8
@schematics/update 0.6.8
rxjs 6.2.1
typescript 2.7.2
解决方案
更新到当前版本的 node.js 解决了这个问题。
推荐阅读
- docker - 在 docker 中为独立命令更智能地构建缓存
- .net - 如何通过 Global.asax.cs 文件中的 Access-Control-Allow-Origin 允许多个源域?
- vba - 如何在不使用数据集中的表格的情况下根据列中的某个单词锁定整行
- ios - Swift 中的动态表格图像视图
- python - 如何根据python 2.7中的条件转置特定列
- c# - 执行run as command并在c#中输入密码
- java - DatabaseMetaData#getTables 不返回任何内容
- excel-formula - Excel用连续值填充表
- javascript - 仅在 MapQuest/Leaflet 中更改符号选项
- mongodb - 有没有办法在 mongodb 全文搜索中自定义词干提取过程?