xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
See original GitHub issueEDITED FOR PEOPLE JUST GETTING HERE
See https://github.com/nodejs/node-gyp/issues/569#issuecomment-255589932 and https://github.com/nodejs/node-gyp/issues/569#issuecomment-259421050, the warning can just be ignored. Command Line Tools works fine, you do not need the full Xcode.
See https://github.com/nodejs/node-gyp/blob/master/macOS_Catalina.md, here and here for more info.
Fix:
xcode-select --install # Install Command Line Tools if you haven't already.
sudo xcode-select --switch /Library/Developer/CommandLineTools # Enable command line tools
then just ignore the warning.
Alternatively if you want you can use the full Xcode.app (if you have it installed) with:
# Change the path if you installed Xcode somewhere else.
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
If your install is failing
There will be other errors nearer the end, almost certainly issues with the module you’re trying to install or a dependency. Please report the error to that project.
If that doesn’t work
Are you seeing this when you run node-gyp rebuild or npm install? If not then it’s nothing to do with node-gyp, raise a bug with the project you’re using.
Issue Analytics
- State:
- Created 9 years ago
- Reactions:1634
- Comments:151 (20 by maintainers)
Top Related StackOverflow Question
This fixed it for me:
sudo xcode-select -s /Applications/Xcode.app/Contents/DeveloperSee this explanation on SO.
EDIT(gibfahn): Command line tools is fine, you don’t need the full Xcode. Just ignore the warning. See here and here for more info.
EDIT(gibfahn): Command line tools is fine, you don’t need the full Xcode. Just ignore the warning. See here and here for more info.
Common Problems:
Here’s all the answers from this thread and links compiled into one.
Xcode(Note whether you seeXcode,Xcode-beta,Xcode-87…)/Applicationsdirectory ← NOT/Users/{user}/Applicationssudo xcode-select --switch /Applications/Xcode-beta.app/Contents/Developersudo xcode-select --switch /Applications/Xcode.app/Contents/DeveloperXcode-87, then it would be:sudo xcode-select --switch /Applications/Xcode-87.app/Contents/DeveloperTested on