1、因為node項目終端報錯:
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!
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
2、查閱相關博客后有以下解決方案
終端輸入:
xcode-select --install
3、但未能解決問題,控制台
終端報錯:
xcode-select: error: command line tools are already installed, use "Software Update" to install updates
4、終端輸入如下命令查看當前CLT(Command Line Tools)版本
brew config
5、最后找到解決辦法:
直接去Apple 官網下載最新版本的Command Line Tools安裝即可,然后再通過brew config
查看當前CLI版本號是否變更
鏈接:https://developer.apple.com/download/more/