问题:
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! 12@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 12@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! D:\nodejs\node_modules\_logs\2020-10-27T05_45_14_277Z-debug.log
找了很多,都说是版本的问题,最后终于找到正确的解决办法!
package-lock.json yarn.lock 这两个文件千万别提交很恶心!
解决方法:
删除node_modules
删除package-lock.json yarn.lock
清缓存
install
启动
rm -rf node_modules
rm package-lock.json yarn.lock
npm cache clear --force
npm install