gyp: No Xcode or CLT version detected!解决方案

问题

最近在macOS Catalina中使用npm安装模块,经常会出现如下错误:

gyp: No Xcode or CLT version detected!

截图如下

解决方案:

1. 命令进行修复

$ xcode-select --install

提示如下信息:

xcode-select: error:commandline tools are already installed, use"Software Update"to install updates

而事实上并没有所谓的"Software Update"可以更新

可使用如下解决方案:

$ sudo rm -rf $(xcode-select -print-path)

$ xcode-select --install

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容