npm audit fix 解决方法

转载请注明出处
个人博客: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

网上找了好久,都没有解决,后来看到一篇博客解决。解决方法如下:

  1. 淘宝镜像源会自动修复,然后下载相关依赖包。
  2. 使用nrm use taobaonrm如果没有安装,就使用npm i -g nrm,然后再使用nrm use taobao
  3. 再使用npm i 安装一遍所有依赖包,这时候没下载的会自动下载,问题解决。
  • 17
    点赞
  • 34
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 7
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 7
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

MaXuwl

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值