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

前端 未结 13 1526
没有蜡笔的小新
没有蜡笔的小新 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:27

    I did exactly this, my issue is gone now. First: xcode-select --print-path it gave path /Library/Developer/CommandLineTools

    so:

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

    it pops up the install window, just install and you are on your way.

    Thanks Stackoverflow!

提交回复
热议问题