vue项目webpack打包失败,npm ERR! code ELIFECYCLE

运行 npm run build 打包出错。各位大神怎么解决的?
错误代码:

hunks                    Chunk Names
              addons/wx_carpool/staticone/js/app.ef602a3c240aa34f7b1f.js    1.87 MB       0  [emitted]  [big]  app
         addons/wx_carpool/staticone/js/manifest.306cea682bd69ba592f2.js    1.48 kB       1  [emitted]         manifest
addons/wx_carpool/staticone/css/app.7272faa00a213638c970377dad9dc5d2.css    2.35 MB       0  [emitted]  [big]  app
          addons/wx_carpool/staticone/js/app.ef602a3c240aa34f7b1f.js.map    2.45 MB       0  [emitted]         app
     addons/wx_carpool/staticone/js/manifest.306cea682bd69ba592f2.js.map    14.3 kB       1  [emitted]         manifest
                                                              index.html  516 bytes          [emitted]         
                           addons/wx_carpool/staticone/icon/iconfont.css    13.4 kB          [emitted]         
                          addons/wx_carpool/staticone/icon/iconfont.woff    8.33 kB          [emitted]         

ERROR in addons/wx_carpool/staticone/js/app.ef602a3c240aa34f7b1f.js from UglifyJs
Unexpected token: punc (() [addons/wx_carpool/staticone/js/app.ef602a3c240aa34f7b1f.js:1139,8]

  Build failed with errors.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! mbb-vue@1.0.0 build: `node build/build.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the mbb-vue@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!     /home/../.npm/_logs/2017-10-28T03_08_45_883Z-debug.log
阅读 23.3k
2 个回答

原来是书写不规范,像data(){}要写成data:function(){};methods中的goBack(){}等写成goBack:function(){}

新手上路,请多包涵

老哥解决了吗?

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题