Angular生产版本中无效或意外令牌中的错误 [英] ERROR in Invalid or unexpected token on Angular production build

查看:113
本文介绍了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)也可以正常工作.该错误信息不提供从何处开始搜索的线索.造成此错误的原因是什么和/或如何识别?

On other machines, the build works. Also, the debug build (ng serve) works as well. The error message provides no clue on where to start searching. What is the cause for this error and/or how can it be identified?

以下是一些版本信息:

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.

The problem was solved updating to the current version of node.js.

这篇关于Angular生产版本中无效或意外令牌中的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆