vue 项目初始化时,npm run dev报错解决方法
错误如下:npm ERR! code ELIFECYCLEnpm ERR! errno 1npm ERR! travel@1.0.0 dev: `webpack-dev-server --inline --progress --config build/webpack.dev.conf.js`npm ERR! Exit status 1npm ERR!npm ERR! Fa...
错误如下:
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! travel@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 travel@1.0.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! A complete log of this run can be found in:
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.1
(3)、npm run dev
作者:喜宝小窝儿
链接:https://www.jianshu.com/p/59fd30d35248
来源:简书
简书著作权归作者所有,任何形式的转载都请联系作者获得授权并注明出处。
更多推荐
所有评论(0)