MAC M1 安装“sharp"时出了点问题模块 [英] MAC M1 Something went wrong installing the "sharp" module
问题描述
在 MacBook Pro M1 芯片上运行 npm run dev
(gatsby develop
) 退出并显示 错误:安装sharp"时出现问题模块
运行 npm run dev
MacBook Pro intel 芯片工作正常.
我看过类似的帖子,但没有解决我的问题:
我已经更新了我的节点版本,以防有任何修复,但我仍然在 node v16.0.0
在这个 github 问题上,他们建议遵循以下步骤没有用.
<块引用>rm -r node_modules/sharp纱线安装 --check-files
在这个 github 问题上,他们建议安装 NVM
和降级节点版本.在我的 M1 芯片上安装 NVM 有一些困难,所以它对我来说不是一个好的选择.
我也尝试过以下步骤,但效果不佳
rm -rf node_modulerm 包-lock.json我的
知道我可以做些什么来使 gatsby develop
在 M1 芯片上简单工作吗?
按照 this 中的这些步骤操作问题解决了我的问题.
xcode-select --install
brew install gcc
brew 重新安装 vips
brew info vips
npm i
然后就可以运行gatsby develop
Running npm run dev
(gatsby develop
) on MacBook Pro M1 chip exit with Error: Something went wrong installing the "sharp" module
Running npm run dev
MacBook Pro intel chip works fine.
I've seen similar post which did not solved my problem :
- 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
I've update my node version in case any fixes had been made but I still got the error on node v16.0.0
On this github issue they recommend to follow theses steps which did not work.
rm -r node_modules/sharp yarn install --check-files
On this github issue they recommend to install NVM
and downgrade node version. NVM has some difficulties to install on my M1 chip so it is not a good option for me.
I have also tried to do the following steps which did not work as well
rm -rf node_module
rm package-lock.json
npm i
Any idea what I can do to make simply work gatsby develop
on M1 chip ?
Following these steps from this issue solved my problem.
xcode-select --install
brew install gcc
brew reinstall vips
brew info vips
npm i
Then you can run gatsby develop
这篇关于MAC M1 安装“sharp"时出了点问题模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!