错误:
ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! metools@1.0.0 dev: `node build/dev-server.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the metools@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:
npm ERR! C:\Users\think\AppData\Roaming\npm-cache\_logs\2018-03-29T02_46_46_622Z-debug.log
原因:
这是webpack 的新版本的BUG。
解决办法:
卸载新版本,安装老版本。
第一步:
npm remove webpack-dev-server
第二步:
npm install webpack-dev-server@2.9.1
最后重新运行即可。