npm ERR! code ELIFECYCLE
vue—cli执行npm run dev 时候报错
npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! love@1.0.0 dev: webpack-dev-server --inline --progress --config build/webpack.dev.conf.js
npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the love@1.0.0 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:
原因是: webpack 的新版本的BUG,解决方法就是卸载新版本,安装老版本。
执行命令:
npm remove webpack-dev-server
npm install webpack-dev-server@2.9.1
npm run dev
复制代码
执行npm run dev 后报错EnotFound lacallHost:174.25.2.. 然后配置hosts文件中的localhost就可以了