Mac 解决 gyp: No Xcode or CLT vers

2020-05-31  本文已影响0人  Alex0825

mac OS 升级 10.15.x 之后,npm install 提示错误 gyp: No Xcode or CLT version detected!

解决办法

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

The error message above is self explanatory. It saying that the node-gyp rebuild is failed, and this is because No Xcode or CLT version detected.

  • Xcode is an integrated development environment (IDE) for macOS containing a suite of software development tools developed by Apple for developing software for macOS, iPadOS, iOS, watchOS, and tvOS.
  • The CLT stands for “Command Line Tools for Xcode”. This package enables UNIX-style development via Terminal by installing command line developer tools, as well as macOS SDK frameworks and headers. Many useful tools are included, such as the Apple LLVM compiler, linker, and Make. If you use Xcode, these tools are also embedded within the Xcode IDE.
    To solve this problem,we need to download and re-install the macOS “Command Line Tools for Xcode”

参考 https://medium.com/@mrjohnkilonzi/how-to-resolve-no-xcode-or-clt-version-detected-d0cf2b10a750

上一篇下一篇

猜你喜欢

热点阅读