Why is node-gyp rebuild failing on Mac OSX El Capitan

后端 未结 8 2146
囚心锁ツ
囚心锁ツ 2020-12-30 22:50

I recently bought a mac, which uses Mac OSX El Capitan v10.11.4. Installed node with homebrew, and am using node v6.2.2 and npm v3.9.5. I\'m getting an error with bcrypt dur

8条回答
  •  天涯浪人
    2020-12-30 23:33

    Anytime i upgrade OSX to newer version, I get the same issue. Here is how i solve it every time:

    sudo rm -rf  /Library/Developer/CommandLineTools
    xcode-select --install
    

    That's it. Now next time you do npm install or yarn it'll work.

    PS: Sometimes you won't be able to install the command line tool through Xcode-select, for example if you are on beta. In that case, you should be able to install it manually from here: https://developer.apple.com/download/more/

提交回复
热议问题