Vue中demo@0.1.0 serve `vue-cli-service serve`解决方法
情况:日常 cnpm run serve,突然报错npm ERR! code ELIFECYCLEnpm ERR! errno 1npm ERR! demo@0.1.0 serve: `vue-cli-service serve`npm ERR! Exit status 1npm ERR! Failed at the demo@0.1.0 serve script.npm ERR! This is
·
情况:
日常 cnpm run serve,突然报错
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! demo@0.1.0 serve: `vue-cli-service serve`
npm ERR! Exit status 1
npm ERR! Failed at the demo@0.1.0 serve 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! F:Nodejs
ode_cache_logs2021-04-01T12_59_52_414Z-debug.log
PS F:MyVueprogram1day07demo> npm run dev
npm ERR! missing script: dev
npm ERR! A complete log of this run can be found in:
npm ERR! F:Nodejs
ode_cache_logs2021-04-01T13_00_43_138Z-debug.log
PS F:MyVueprogram1day07demo> vue init webpack
解决方法:
懒得想了肯定是依赖的问题,打算直接暴力复原(其实对项目没啥影响,不用担心少了啥,因为源文件根本没去动)
1.把项目里的node_modules,也就是依赖包删掉
2.在终端运行cnpm install,重新安装依赖
3.终端运行cnpm run serve
然后?然后就再次进入到日复一日的code环节
更多推荐
已为社区贡献1条内容
所有评论(0)