I recently updated to MacOS Catalina. And faced some issues when running some git
and npm
commands.
I cloned a repo from GitHub and tried to run
npm ci
This error appeared after running the command
No Xcode or CLT version detected
as the cover image above shows.
Now as every faithful developer, I googled the error and pointed me to StackOverflow and some other blogs.
I checked CommandLineTools path with
xcode-select -print-path
and it showed the correct path
/Library/Developer/CommandLineTools
So maybe the package was broken or some links were not created (not sure lol). So I deleted it
sudo rm -rf /Library/Developer/CommandLineTools
After deleting CommandLineTools this window prompted me
If the window didn't show, just run
xcode-select --install
But for some reason it didn't download and showed me an error
So I went to download it manually in Apple website. Use your Apple ID to sign in.
https://developer.apple.com/download/more/?=Command%20Line%20Tools
I chose the latest one which is the first entry in the table.
After downloading I just installed the package normally:
And everything worked back to normal after that.
Hope this helps out somebody.
Cheers!
Top comments (0)