vue npm run dev報錯webpack-dev-server

在運行vue項目時報以下問題:vue

E:\mobile_real\mobile-vue>npm run devwebpack

 

> mobile_real@1.0.0 dev E:\mobile_real\mobile-vueweb

> webpack-dev-server --inline --progress --config build/webpack.dev.conf.jsnpm

 

npm ERR! code ELIFECYCLEwebpack-dev-server

npm ERR! errno 1ui

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

npm ERR! Exit status 1spa

npm ERR!debug

npm ERR! Failed at the mobile_real@1.0.0 dev script.code

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!     C:\Users\FKT00120\AppData\Roaming\npm-cache\_logs\2019-05-27T01_45_54_024Z-debug.log

查閱資料發現是webpack新版bug,卸載現有webpack,安裝老版本便可

解決辦法:

一、npm uninstall webpack-dev-server

二、npm install webpack-dev-server@2.9.1

三、npm run dev

相關文章
相關標籤/搜索