本文介绍了如何修复'不受支持的[email protected]平台:想要的{"os":"darwin","arch":"any"}(当前:{“" os“:" win32“," ; arch“:" x64“})的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

测试二进制二进制很好npm WARN回滚回滚[email protected]失败(这可能是无害的):

Testing binaryBinary is finenpm WARN rollback Rolling back [email protected] failed (this is probably harmless):

npm通知创建了一个锁定文件,作为package-lock.json.你应该犯 该文件.

npm notice created a lockfile as package-lock.json. You should commit this file.

npm警告可选的跳过选择性依赖:[email protected] (node_modules \ fsevents):

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):

npm警告不支持跳过可选依赖项:不支持的平台 对于[email protected]:通缉{"os":"darwin","arch":"any"}(当前: {"os":"win32","arch":"x64"})

npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

增加了来自1050个贡献者的1105个程序包,并在445.94秒内审核了53269个程序包发现1个严重漏洞 运行npm audit fix进行修复,或运行npm audit进行详细操作

added 1105 packages from 1050 contributors and audited 53269 packages in 445.94sfound 1 high severity vulnerability run npm audit fix to fix them, or npm audit for details

推荐答案

  • 首先
    • First,
    • Administrator 角色运行命令提示符 powershell .然后您会避免使用PERMISSION ERROR.

      Run your command prompt or powershell as Administrator role. Then you'll get avoided with PERMISSION ERROR.

      • 第二,

      忽略npm audit fix.它仅建议您更新所有package.json依赖项.您应该保留在package.json中阐明的设置.

      Ignore npm audit fix. It only suggests you to renovate all of your package.json dependencies up-to-date. You should preserve the settings clarified in package.json.

      • 第三,

      我想,如果您正在使用ubuntu或OS X,就不会遇到此问题.

      If you're working on ubuntu or OS X, you won't face this issue, I guess.

      PS:

      根据您的回复,我想考虑解决方法.

      According to your reply, I'd like to think about the workaround.

      • 删除本地 node_modules& package-lock.json
      • 通过npm cache verify
      • 清理npm缓存
      • 通过sudo npm i -g npm
      • 更新全局 npm
      • 通过npm i
      • 重新安装本地 node_modules
      • Remove the local node_modules & package-lock.json
      • Clean npm cache by npm cache verify
      • Update the global npm by sudo npm i -g npm
      • Reinstall the local node_modules by npm i

      希望这会有所帮助.

      这篇关于如何修复'不受支持的[email protected]平台:想要的{"os":"darwin","arch":"any"}(当前:{“" os“:" win32“," ; arch“:" x64“})的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-31 11:17