转载请注明出处
个人博客:https://maxusun.github.io/
这两天使用npm一直出现这个错误,当时没有在意,后来发现报的错误越来越多,如下:
found 658 vulnerabilities (654 low, 3 moderate, 1 high) in 2770 scanned packages
run `npm audit fix` to fix 1 of them.
4 vulnerabilities require semver-major dependency updates.
653 vulnerabilities require manual review. See the full report for details.
根据上面的提示输入npm audit fix,还是没有解决,报的错误如下:
fixed 5 of 658 vulnerabilities in 2770 scanned packages
653 vulnerabilities required manual review and could not be updated
1 package update for 4 vulnerabilities involved breaking changes
网上找了好久,都没有解决,后来看到一篇博客解决。解决方法如下:
- 淘宝镜像源会自动修复,然后下载相关依赖包。
- 使用
nrm use taobao,nrm如果没有安装,就使用npm i -g nrm,然后再使用nrm use taobao - 再使用
npm i安装一遍所有依赖包,这时候没下载的会自动下载,问题解决。
本文解决了一个常见的npm问题,即大量漏洞错误的出现。通过使用淘宝镜像源和nrm工具,成功修复了658个漏洞,包括654个低危、3个中危和1个高危漏洞。文章详细介绍了如何通过切换npm源和重新安装依赖包来解决问题。
1637

被折叠的 条评论
为什么被折叠?



