这是 npm run build 产生的错误消息:
ERROR in build.js from UglifyJs
Unexpected token: punc (() [src/App.vue:40,0][build.js:139,6]
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! [email protected] build: `cross-env NODE_ENV=production
webpack --hide-modules`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely
additional logging output above.
npm ERR! A complete log of this run can be found in:
[log file]
我能找到的唯一相关问题是this(以及它链接到的答案)但是正如您从上面的截图中看到的那样,没有-p
在我的构建命令中。
我什至不知道Uglify是什么。我从 vue 的默认启动器开始(simple-webpack
)并添加sass
功能和菜单组件仅此而已。
我无法理解日志文件中的任何内容,但在我看来,它并没有真正指出任何问题。
13 verbose stack Error: [email protected] build: `cross-env NODE_ENV=production webpack --hide-modules`
13 verbose stack Exit status 2
13 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
13 verbose stack at EventEmitter.emit (events.js:182:13)
13 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:182:13)
13 verbose stack at maybeClose (internal/child_process.js:962:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
14 verbose pkgid [email protected]
15 verbose cwd /Users/path/poc3
16 verbose Darwin 16.7.0
17 verbose argv "/usr/local/Cellar/node/7.10.0/bin/node" "/usr/local/bin/npm" "run" "build"
18 verbose node v10.12.0
19 verbose npm v6.4.1
20 error code ELIFECYCLE
21 error errno 2
22 error [email protected] build: `cross-env NODE_ENV=production webpack --hide-modules`
22 error Exit status 2
23 error Failed at the [email protected] build script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 2, true ]
请帮忙,我已经用我的智慧结束了。
不确定问题是什么,但将项目移动到不同的目录解决了它。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)