首页 前端知识 已解决:This is probably not a problem with npm. There is likely additional logging output above.

已解决:This is probably not a problem with npm. There is likely additional logging output above.

2024-08-24 23:08:01 前端知识 前端哥 515 236 我要收藏

最近在运行前端项目时遇到如下报错

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! lianshan@2.0.0 serve: `vue-cli-service serve`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the lianshan@2.0.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!     /Users/xxx/.npm/_logs/2024-03-15A53_03_05_072Z-debug.log

原因时node_modules依赖出了问题,这种时候重新安装依赖包是最好的方法,谁知道哪个依赖包多了哪个依赖包少了呢?重新来过最稳妥。

解决方法

1、删除node_modules文件夹

2、文件夹下运行npm cache clean --force命令清除npm缓存

3、npm i重新下载依赖包

4、再尝试重启项目即可

转载请注明出处或者链接地址:https://www.qianduange.cn//article/16751.html
标签
评论
发布的文章

安装Nodejs后,npm无法使用

2024-11-30 11:11:38

大家推荐的文章
会员中心 联系我 留言建议 回顶部
复制成功!