错误信息:
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! vueDemoTow@1.0.0 dev: `webpack-dev-server`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the vueDemoTow@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\wei\AppData\Roaming\npm-cache\_logs\2020-02-14T07_30_52_311Z-debug.log
我的这个报错是因为 我早已经安装了cnpm i webpack-cli -g, 以为已经安装了全局了, 但是还是报错找不到愿意
再重新在本地项目中, 安装 cnpm i webapck-cli 后问题就解决了
解决方法:
将需要依赖的包, 在本地项目中重新安装一次, 即使是全局的包
cnpm i webpack
cnpm i webpack-cli -D等等....