报错如下
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] dev: `webpack-dev-server --inline --progress
--config build/webpack.dev.conf.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] dev 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!
C:\Users\admin\AppData\Roaming\npm-cache\_logs\2018-11-09T07_28_28_466Z-debug.log
解决:卸载已安装的新版本webpack,装老版本就好。如果没有安装webpack,跳过第一条命令安装一下就好了。
(1)依次输入以下命令
npm uninstall webpack-dev-server
(2)安装2.9.1的webpack
npm install [email protected]
(3)运行项目
npm run dev
热门工具 换一换