鍍金池/ 問(wèn)答/HTML/ vue項(xiàng)目webpack打包失敗,npm ERR! code ELIFECYCL

vue項(xiàng)目webpack打包失敗,npm ERR! code ELIFECYCLE

運(yùn)行 npm run build 打包出錯(cuò)。各位大神怎么解決的?
錯(cuò)誤代碼:

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
回答
編輯回答
心癌

原來(lái)是書(shū)寫(xiě)不規(guī)范,像data(){}要寫(xiě)成data:function(){};methods中的goBack(){}等寫(xiě)成goBack:function(){}

2017年7月21日 14:10
編輯回答
淡墨

老哥解決了嗎?

2018年2月20日 05:03