`npm install` fails on node-gyp rebuild with `gyp: No Xcode or CLT version detected!`

前端 未结 13 1494
没有蜡笔的小新
没有蜡笔的小新 2020-12-07 12:56

Every time I try npm install. I get the following error. How do I fix it?

gyp: No Xcode or CLT version detected!

I am on n

相关标签:
13条回答
  • 2020-12-07 13:40

    On catalina i did the following:

    xcode-select --print-path
    sudo rm -rf /Library/Developer/CommandLineTools
    

    And since install command doesnt work, I had to download it from: https://developer.apple.com/download/more/

    From there install:

    XCode 12
    Command Line Tools for XCode 12
    

    Post that removed existing node_modules and reinstalled through npm install. It worked.

    0 讨论(0)
提交回复
热议问题