npm安装时出现run `npm audit fix` to fix them, or `npm audit` for details

1、第一种解决办法

npm audit fix
npm audit fix --force
npm audit
 

执行命令的日志:

D:\intellijIDEA-workspace\finance-vip-frontend>npm install cnpm
+ cnpm@6.1.0
added 563 packages from 919 contributors and audited 28328 packages in 133.414s
found 1 critical severity vulnerability
  run `npm audit fix` to fix them, or `npm audit` for details

D:\intellijIDEA-workspace\finance-vip-frontend>npm audit fix
up to date in 12.666s
fixed 0 of 1 vulnerability in 28328 scanned packages
  1 vulnerability required manual review and could not be updated

D:\intellijIDEA-workspace\finance-vip-frontend>npm audit fix --force
npm WARN using --force I sure hope you know what you are doing.
up to date in 12.492s
fixed 0 of 1 vulnerability in 28328 scanned packages
  1 vulnerability required manual review and could not be updated

D:\intellijIDEA-workspace\finance-vip-frontend>npm audit
                                                                                
                       === npm audit security report ===                        
                                                                                
                                                                                
                                 Manual Review                                  
             Some vulnerabilities require your attention to resolve             
                                                                                
          Visit https://go.npm.me/audit-guide for additional guidance           
                                                                                
                                                                                
  Critical        Command Injection                                             
                                                                                
  Package         open                                                          
                                                                                
  Patched in      >0.0.5                                                        
                                                                                
  Dependency of   cnpm                                                          
                                                                                
  Path            cnpm > open                                                   
                                                                                
  More info       https://npmjs.com/advisories/663                              
                                                                                
found 1 critical severity vulnerability in 28328 scanned packages
  1 vulnerability requires manual review. See the full report for details.

D:\intellijIDEA-workspace\finance-vip-frontend>npm install
audited 28328 packages in 14.722s
found 1 critical severity vulnerability
  run `npm audit fix` to fix them, or `npm audit` for details
 

 

 

第二种解决办法

删除已经安装的:node_modules 和 package-lock.json
修改 package.json 格式如下
npm audit fix --force
npm instal
 

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值