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

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

    I was facing the same issue

    I reinstalled the command line tools.

    You need to find the installation directory.

    xcode-select --print-path
    

    Delete the existing installation:

    sudo rm -r -f /Library/Developer/CommandLineTools
    

    Install by running:

    xcode-select --install
    

提交回复
热议问题