【问题标题】:Error:'darwin-x64' binaries cannot be used on the 'darwin-arm64v8' platform错误:\'darwin-x64\' 二进制文件不能在 \'darwin-arm64v8\' 平台上使用
【发布时间】:2022-09-25 14:37:02
【问题描述】:

当我尝试在 Intellj 上执行 git push 时,我遇到了这个错误。
这是与this one 类似的问题,但相反(那个是\'darwin-x64\' 二进制文件不能在\'darwin-arm64v8\' 上使用)
我已经尝试了该帖子中的所有解决方案,但 git push 仍然抛出相同的错误。

以下是我执行 git push 时收到的错误。

Error in \"/Users/xxx/Projects/cpss/node_modules/gatsby-transform
er-sharp/gatsby-node.js\": \'darwin-x64\' binaries cannot be used on the
\'darwin-arm64v8\' platform. Please remove the \'node_modules/sharp\' directory and
run \'npm install\' on the \'darwin-arm64v8\' platform.
Error:\'darwin-x64\' binaries cannot be used on the \'darwin-arm64v8\' platform. 
Please remove the \'node_modules/sharp\' directory and run \'npm install\' on the 
\'darwin-arm64v8\' platform.

我试图删除 node_modules/sharp 并运行 npm install 但它不起作用。

有人可以向我解释如何在 \'darwin-arm64v8\' 平台上运行 npm install 吗?
谢谢你。

    标签: node-modules sharp darwin


    【解决方案1】:

    答案here 为我解决了这个问题:

    运行brew reinstall vips。然后删除node_modules 文件夹并再次安装所有依赖项(使用npm installyarn)。

    【讨论】:

      猜你喜欢
      • 2021-10-19
      • 2020-09-14
      • 2020-05-27
      • 1970-01-01
      • 1970-01-01
      • 2020-01-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多