【发布时间】:2021-08-06 03:44:44
【问题描述】:
在带有 Error: Something went wrong installing the "sharp" module 的 MacBook Pro M1 芯片出口上运行 npm run dev (gatsby develop)
运行npm run dev MacBook Pro 英特尔芯片工作正常。
我看过类似的帖子,但没有解决我的问题:
- When i run "gatsby develop " Something went wrong installing the "sharp" module error is showing
- Error Installing Gatsby Starter 'Something went wrong installing the "sharp" module'
- Gatsby Develop : Something went wrong installing the "sharp" module
我已经更新了我的节点版本以防任何修复,但我仍然在node v16.0.0 上收到错误
在这个github issue 上,他们建议按照这些不起作用的步骤进行操作。
rm -r node_modules/sharp yarn install --check-files
在这个github issue 上,他们建议安装NVM 并降级节点版本。 NVM 在我的 M1 芯片上安装有些困难,所以它对我来说不是一个好的选择。
我也尝试过以下步骤,但效果不佳
rm -rf node_module
rm package-lock.json
npm i
知道我可以做些什么来让gatsby develop 在 M1 芯片上简单地工作吗?
【问题讨论】:
标签: javascript node.js npm apple-m1 sharp