解决 gyp: No Xcode or CLT version detected!

827 阅读1分钟

vue create 报错 gyp: No Xcode or CLT version detected!

解决方案

  1. 尝试用如下命令进行修复
$ xcode-select --install
  1. 如果系统提示如下信息时
xcode-select: error: command line tools are already installed, use "Software Update" to install updates
  1. 以下操作即可解决
$ sudo rm -rf $(xcode-select -print-path)
$ xcode-select --install