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?
I had two instance of Xcode installed xcode.app and xcode-beta.app When I tried to create a build with netbeans it showed me the error "supported version of xcode and command line tools not found netbeans"
I followed the following steps:
after 1 I found that it is pointing me to xcode-beta.app
so here is the solution which worked like a charm:
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
I was having an issue while trying to install packages using npm. I got the error: "sudo xcode-select -s /Applications//Xcode.app/Contents/Developer/"
To fix this
Now when installing packages with npm I no longer get errors.
Without Xcode: create file
/usr/local/bin/xcodebuild
with content to cheat XcodeSelectchmod +x /usr/local/bin/xcodebuild
Install Xcode from App Store. After installing run xcodebuild with root privileges i.e.
sudo xcodebuild
and accept the language. After thisnpm install bcrypt
worked like a charm!XCode2: sudo xcode-select -s /Applications/Xcode\ 2.app/Contents/Developer
Pay attention to the "\" to escape the space