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
This happens most of the time when there is new OS updates happens. But I found a solutions to tackle this problem. You need to follow the below steps to solve.
Reinstall command-line tools by removing the previously installed version.
step1: First, get the location of the installed command-line tools
xcode-select --print-path
the result of the above command /Library/Developer/CommandLineTools
step2: removed the folder
sudo rm -rf /Library/Developer/CommandLineTools
step3 - install again
xcode-select --install
With the reinstallation of the command line developer tools the gyp: No Xcode or CLT version detected error message should disappear when you run any yarn or npm commands from the command line.