No Xcode or CLT 📦 npm

gyp: No Xcode or CLT version detected!

node-gyp on macOS can’t find the Xcode Command Line Tools to compile native modules.

Seen on: npm

Meaning

macOS updates often remove or invalidate the Command Line Tools.

Common causes

  • Command Line Tools missing after a macOS update
  • xcode-select pointing to a removed path

⚡ Quick fix

  1. Reinstall CLT: xcode-select --install
  2. Reset: sudo xcode-select --reset
  3. If that fails, remove /Library/Developer/CommandLineTools and reinstall

Detailed fix by platform

iOS

  1. sudo rm -rf /Library/Developer/CommandLineTools && xcode-select --install

How to diagnose

  1. Path — xcode-select -p
  2. Recent change — Did it start after a deploy, upgrade, or configuration change? Compare with the last working version.

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.