Loading... ## 1.问题描述 macOS版本`macOS Catalina 10.15.2`,执行 npm install 时出现gyp报错: ```shell 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! ``` <!-- more --> ## 2.解决方案 ### 1.安装Xcode 命令行工具 Command Line Tools ```shell xcode-select --install ``` ### 2.同意服务条款 可能由于系统或xcode更新改变了相关文件。 打开Xcode,点击同意服务条款即可。 ### 3.设置xcode路径 ```shell sudo xcode-select -s /Applications/Xcode.app/Contents/Developer ``` ### 4.执行命令行工具初始化 ```shell sudo xcode-select --reset ``` 听说,点击下方广告的人都找到了真爱! Last modification:April 17, 2020 © Allow specification reprint Support Appreciate the author AliPayWeChat Like 听说,打赏我的人都找到了真爱!