fsevents@1.2.13: wanted {“os“:“darwin“,“arch“:“any“} (current: {“os“:“win32“,“arch“:“x64“})

1 篇文章 0 订阅

报错解决方法:在安装依赖的时候

npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but package-lock.json was generated for lockfileVersion@2. I'll try to do my best with it!
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm ERR! code EBADPLATFORM
npm ERR! notsup Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! notsup Valid OS:    darwin
npm ERR! notsup Valid Arch:  any
npm ERR! notsup Actual OS:   win32
npm ERR! notsup Actual Arch: x64

在命令后面加上 --force 重新运行

比如:npm i less less-loader -D --force 就OK了

  • 4
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
回答: 这个错误是因为在安装依赖时出现了平台不支持的情况。具体来说,你的当前平台是win32,但是依赖项fsevents@1.2.13要求的平台是darwin。要解决这个问题,你可以尝试升级fsevents到版本2,因为fsevents 1在node v14上可能会出现问题并且可能使用不安全的二进制文件。另外,你还可以检查一下你的项目源码中是否存在其他错误导致这个问题出现。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [Unsupported platform for fsevents@1.2.13: wanted {“name“:“fsevents“,“version“:“1.2.13“,...](https://blog.csdn.net/u010164507/article/details/126643348)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 33.333333333333336%"] - *2* [fsevents@1.2.13: wanted {“os“:“darwin“,“arch“:“any“} (current: {“os“:“win32“,“arch“:...](https://blog.csdn.net/weixin_39031037/article/details/124841939)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 33.333333333333336%"] - *3* [记录 vue-admin-template 中 npm install 错误解决办法](https://blog.csdn.net/AJ_007/article/details/109328482)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 33.333333333333336%"] [ .reference_list ]

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值