No Xcode or CLT version detected 解决办法

Mac系统,在用npm安装依赖包的时候总会报这个错误:gyp: No Xcode or CLT version detected!
原因是Xcode命令行工具有问题,需要删掉重装。

1 查看安装路径

xcode-select --print-path

默认的路径应该是/Library/Developer/CommandLineTools

2 删除

sudo rm -r -f /Library/Developer/CommandLineTools

3 重新安装

xcode-select --install

这个工具包大小400多m很快就能装完

本站文章如未注明均为原创 | 文章作者:刘晓帆 | 转载请注明来自:前端印象

发表评论

邮箱地址不会被公开。 必填项已用*标注

浏览量:227 次浏览