问题来源
在安装macOS使用brew 安装 node brew install node
的时候,可能会遇到这些问题
./configure
--prefix=/usr/local/Cellar/node/14.10.1
--without-npm
--with-intl=system-icu
No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.
No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'.
No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'.
gyp: No Xcode or CLT version detected!
Node.js configure: Found Python 3.8.5...
Error running GYP
READ THIS: https://docs.brew.sh/Troubleshooting
前置问题-brew update卡住
参考别人的
brew update 长时间没反应解决办法或长时间卡在Updating Homebrew…
解决方案
- 安装好完整的Xcode
- 打开Xcode,让Xcode安装好CLT等组件
- 打开终端跑
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
参考
https://github.com/nodejs/node-gyp/issues/1927