本文主要是介绍npm报错:code ELIFECYCLE \ A complete log of this run can be found in:...,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
报错现象:
在npm start时,出现错误如下:
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ******@0.1.0 start: `rocketact-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at ******@0.1.0 start 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:
原因:项目安装模块不成功,对于之前的安装包有影响
解决方法:清空所有安装模块,重新安装node_modules
1、手动删除node_modules文件夹,部分文件夹需要授予管理员权限,可以进入文件夹挨个删除
2、清空缓存
npm cache clean --force
3、重新安装node_modules
yarn install
4、重启项目
然后你就可以开心的调试代码了~
注:有时候在步骤3的时候会出问题,可以重新新建工程(比较笨的方法)
参考:https://blog.csdn.net/weixin_42470791/article/details/82833415
这篇关于npm报错:code ELIFECYCLE \ A complete log of this run can be found in:...的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!