DEV Community

Cover image for No Xcode or CLT version detected
Chester Martinez
Chester Martinez

Posted on

No Xcode or CLT version detected

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
Enter fullscreen mode Exit fullscreen mode

This error appeared after running the command

No Xcode or CLT version detected
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

and it showed the correct path

/Library/Developer/CommandLineTools
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

After deleting CommandLineTools this window prompted me
Alt Text

If the window didn't show, just run

xcode-select --install
Enter fullscreen mode Exit fullscreen mode

But for some reason it didn't download and showed me an error
Alt Text

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:
Alt Text

And everything worked back to normal after that.

Hope this helps out somebody.

Cheers!

Top comments (0)