npm WARN optional SKIPPING OPTIONAL DEPENDENCY

npm install的时候,报了以下内容 fsevents@....

PS F:\web\ npm install
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

audited 20486 packages in 19.838s
found 10 vulnerabilities (5 low, 4 moderate, 1 critical)
run `npm audit fix` to fix them, or `npm audit` for details

这个问题在win/linux使用时,就会报警告, 因为fsevents的依赖属于mac操作系统,所以 忽视即可

 

并且发现10个漏洞(found 10 vulnerabilities)

控制台提示 run 'npm audit fix' ,执行完了,如下:

updated 4 packages in 25.094s
fixed 1 of 10 vulnerabilities in 20486 scanned packages
  2 vulnerabilities required manual review and could not be updated
  2 package updates for 7 vulns involved breaking changes
  (use `npm audit fix --force` to install breaking changes; or refer to `npm audit` for steps to fix these manually)

 

npm audit :分析复杂的代码,并找出漏洞和缺陷

npm audit fix  :检测项目依赖中的漏洞并自动安装需要更新的有漏洞的依赖或修复

 

最后根据提示执行npm audit fix --force 进行install,应该OK了

added 70 packages from 91 contributors, removed 21 packages and updated 1 package in 26.719s
fixed 4 of 6 vulnerabilities in 20486 scanned packages
  2 vulnerabilities required manual review and could not be updated
  1 package update for 4 vulns involved breaking changes
  (installed due to `--force` option)

 

虽然不会前端,但也要会看提示,慢慢学习

转载于:https://my.oschina.net/u/3829444/blog/2870219

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值