npmxcode95% confidence\u2191 1089

xcode-select active developer directory error

Full error message
Saw the following error when running an npm install which required node-gyp... but could be triggered by anything which requires xcode-select.

  xcode-select: error: tool 'xcodebuild' requires Xcode, but active
  developer directory '/Library/Developer/CommandLineTools' is a command
  line tools instance

What is the problem?

This problem happens when xcode-select developer directory was pointing to /Library/Developer/CommandLineTools when a full regular Xcode was required (happens when CommandLineTools are installed after Xcode) Solution: Install Xcode (get it from https://appstore.com/mac/apple/xcode) if you don't have it yet. Accept the Terms and Conditions. Ensure Xcode app is in the /Applications directory (NOT /Users/{user}/Applications). Point xcode-select to the Xcode app Developer directory using the following command: sudo xcode-select -s /Applications/Xcode.app/Contents/Developer Note: Make sure your Xcode app path is correct. Xcode: /Applications/Xcode.app/Contents/Developer Xcode-beta: /Applications/Xcode-beta.app/Contents/Developer

API access

Get this solution programmatically \u2014 free, no authentication.

curl https://depscope.dev/api/error/1d9a491ca4b5a2ad5d1312a2ec62f946b53741ef053e3f6672af1f7c20e0b826
hash \u00b7 1d9a491ca4b5a2ad5d1312a2ec62f946b53741ef053e3f6672af1f7c20e0b826
xcode-select active developer directory error — DepScope fix | DepScope