xcode-select

Some applications require compilation tools from Apple Xcode. You can get these from:

  • Apple Xcode (6100 MB)
  • Apple Command Line Tools (930 MB)

You probably don’t need Xcode, so install the smaller Command Line Tools.

Install

Every version of macOS screws this up. Figure it out.

macOS Ventura 13

xcode-select --install

macOS Monterey 12

xcode-select --install

macOS Big Sur 11

xcode-select --install

macOS Catalina 10.15

Some version of command line tools are already installed, but common Node commands might fail like:

gyp: No Xcode or CLT version detected!

Here’s how to fix it:

xcode-select --install
# Says: xcode-select: error: command line tools are already installed, use "Software Update" to install updates

xcode-select -print-path
# Says: /Library/Developer/CommandLineTools

# Delete that
rm -rf /Library/Developer/CommandLineTools

# Reinstall Xcode
xcode-select --install

macOS Mojave 10.14

That command doesn’t work anymore. It’ll start to download and encounter “network connectivity issues”.

  1. Visit the Apple developer downloads website.
  2. Download this file: Command Line Tools (macOS 10.14) for Xcode 10.1
  3. Install it.

Now run xcode-select --install and it should say “already installed”.

macOS High Sierra 10.13

xcode-select --install