解決vue項目運行過程當中,npm run dev 報錯問題

【方案1】node

錯誤以下:

npm ERR! code ELIFECYCLEwebpack

npm ERR! errno 1web

npm ERR! travel@1.0.0 dev: `webpack-dev-server --inline --progress --config build/webpack.dev.conf.js`npm

npm ERR! Exit status 1json

npm ERR!webpack-dev-server

npm ERR! Failed at the travel@1.0.0 dev script.ui

npm ERR! This is probably not a problem with npm. There is likely additional logging output above.this

npm WARN Local package.json exists, but node_modules missing, did you mean to install?spa

npm ERR! A complete log of this run can be found in:debug

npm ERR!    D:\Program Files\nodejs\node_cache\_logs\2018-08-01T09_05_17_312Z-debug.log

緣由:這是新版webpack存在的BUG,卸載現有的新版本webpack,裝老版本就好。

1)、npm uninstall webpack-dev-server (2)、npm install webpack-dev-server@2.9.13)、npm run dev

 

 

【方案2】

npm install -save npm run dev

     

 

 

 

 

.

相關文章
相關標籤/搜索