【发布时间】:2018-02-27 09:23:31
【问题描述】:
我正在尝试构建我的 vue 项目并将其推送到 github 页面中。
我正在尝试运行npm run build,但我得到的只是这个:
> my-domain@1.0.0 build /Users/macbookair/Workspace/fun/mine/web
> cross-env NODE_ENV=production webpack --progress --hide-modules
Hash: 2399923ef57865258a1f
Version: webpack 3.11.0
Time: 9252ms
Asset Size Chunks Chunk Names
build.js 740 kB 0 [emitted] [big] main
build.js.map 919 kB 0 [emitted] main
ERROR in build.js from UglifyJs
Unexpected token: punc (() [build.js:503,6]
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! andre.js.org@1.0.0 build: `cross-env NODE_ENV=production webpack --progress --hide-modules`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the andre.js.org@1.0.0 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:
npm ERR! /Users/macbookair/.npm/_logs/2018-02-27T09_19_23_677Z-debug.log
我也尝试运行npm run build; push-dir --dir=dist --branch=gh-pages --cleanup,我得到的只是这个:
> andre.js.org@1.0.0 build /Users/macbookair/Workspace/fun/mine/web
> cross-env NODE_ENV=production webpack --progress --hide-modules
Hash: 2399923ef57865258a1f
Version: webpack 3.11.0
Time: 9524ms
Asset Size Chunks Chunk Names
build.js 740 kB 0 [emitted] [big] main
build.js.map 919 kB 0 [emitted] main
ERROR in build.js from UglifyJs
Unexpected token: punc (() [build.js:503,6]
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! andre.js.org@1.0.0 build: `cross-env NODE_ENV=production webpack --progress --hide-modules`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the andre.js.org@1.0.0 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:
npm ERR! /Users/macbookair/.npm/_logs/2018-02-27T09_22_29_715Z-debug.log
我真的不知道如何构建它,因为我是 Vue 新手,我正在使用 webpack-simple vue 模板
【问题讨论】:
标签: javascript webpack vue.js