New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
davis opened this Issue Jan 28, 2015 · 86 comments

Comments

Projects
None yet
@davis

davis commented Jan 28, 2015

EDITED FOR PEOPLE JUST GETTING HERE

See #569 (comment) and #569 (comment), the warning can just be ignored. Command Line Tools works fine, you do not need the full Xcode.

See 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.

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.

@alejandroiglesias

This comment has been minimized.

Show comment
Hide comment
@alejandroiglesias

alejandroiglesias Apr 9, 2015

I'm looking for the same answer.

alejandroiglesias commented Apr 9, 2015

I'm looking for the same answer.

@davis

This comment has been minimized.

Show comment
Hide comment
@davis

davis Apr 13, 2015

@alejandroiglesias, try this: download Xcode from the app store, open it and accept the license/terms agreement, and try whatever you were doing again.


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.

davis commented Apr 13, 2015

@alejandroiglesias, try this: download Xcode from the app store, open it and accept the license/terms agreement, and try whatever you were doing again.


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.

@jfmercer

This comment has been minimized.

Show comment
Hide comment
@jfmercer

jfmercer Apr 21, 2015

This fixed it for me:

  1. Install Xcode
  2. Run sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

See 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.

jfmercer commented Apr 21, 2015

This fixed it for me:

  1. Install Xcode
  2. Run sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

See 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.

@nitinnain

This comment has been minimized.

Show comment
Hide comment
@nitinnain

nitinnain May 21, 2015

Same answer as @jfmercer . But if you installed XCode beta, use this command instead:
sudo xcode-select -s /Applications/Xcode-Beta.app/Contents/Developer

nitinnain commented May 21, 2015

Same answer as @jfmercer . But if you installed XCode beta, use this command instead:
sudo xcode-select -s /Applications/Xcode-Beta.app/Contents/Developer

@Fishrock123 Fishrock123 added the MacOS label Aug 22, 2015

@HectorLS

This comment has been minimized.

Show comment
Hide comment
@HectorLS

HectorLS Sep 1, 2015

@nitinnain if i use your command i get
xcode-select: error: invalid developer directory '/Applications/Xcode-Beta.app/Contents/Developer'
i have Xcode7 beta 6 :S

HectorLS commented Sep 1, 2015

@nitinnain if i use your command i get
xcode-select: error: invalid developer directory '/Applications/Xcode-Beta.app/Contents/Developer'
i have Xcode7 beta 6 :S

@dbranchini

This comment has been minimized.

Show comment
Hide comment
@dbranchini

dbranchini Sep 15, 2015

@Tibicenas @nitinnain - same here:
xcode-select: error: invalid developer directory '/Applications/Xcode-Beta.app/Contents/Developer'

dbranchini commented Sep 15, 2015

@Tibicenas @nitinnain - same here:
xcode-select: error: invalid developer directory '/Applications/Xcode-Beta.app/Contents/Developer'

@davis

This comment has been minimized.

Show comment
Hide comment
@davis

davis Sep 15, 2015

@Tibicenas @dbranchini did either of you try my suggestion?

davis commented Sep 15, 2015

@Tibicenas @dbranchini did either of you try my suggestion?

@HectorLS

This comment has been minimized.

Show comment
Hide comment
@HectorLS

HectorLS Sep 17, 2015

@davis finally i uninstalled Xcode and re-install and then doing the xcode-select -switch works.. anyway its a weird issue that should be fixed in the next patch

HectorLS commented Sep 17, 2015

@davis finally i uninstalled Xcode and re-install and then doing the xcode-select -switch works.. anyway its a weird issue that should be fixed in the next patch

@rachellji

This comment has been minimized.

Show comment
Hide comment
@rachellji

rachellji Oct 5, 2015

@davis I tried your suggestion, it worked. thanks!

rachellji commented Oct 5, 2015

@davis I tried your suggestion, it worked. thanks!

@wmertens

This comment has been minimized.

Show comment
Hide comment
@wmertens

wmertens Nov 12, 2015

Is there no way to not use xcodebuild? I don't want to waste 6GB of disk on pointless crap


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.

wmertens commented Nov 12, 2015

Is there no way to not use xcodebuild? I don't want to waste 6GB of disk on pointless crap


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.

@micky2be

This comment has been minimized.

Show comment
Hide comment
@micky2be

micky2be commented Dec 2, 2015

Agreed with @wmertens

@bnoordhuis

This comment has been minimized.

Show comment
Hide comment
@bnoordhuis

bnoordhuis Dec 2, 2015

Member

You can maybe circumvent the xcode-specific logic by passing -DOS=mac -f make-linux to node-gyp (check the source) but it's not supported. I'll close the issue.


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.

Member

bnoordhuis commented Dec 2, 2015

You can maybe circumvent the xcode-specific logic by passing -DOS=mac -f make-linux to node-gyp (check the source) but it's not supported. I'll close the issue.


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.

@bnoordhuis bnoordhuis closed this Dec 2, 2015

@firewoof

This comment has been minimized.

Show comment
Hide comment
@firewoof

firewoof Jan 9, 2016

But if you installed XCode beta, use this command instead:
sudo xcode-select -s /Applications/Xcode-Beta.app/Contents/Developer
hah, it's worked!


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.

firewoof commented Jan 9, 2016

But if you installed XCode beta, use this command instead:
sudo xcode-select -s /Applications/Xcode-Beta.app/Contents/Developer
hah, it's worked!


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.

@turibbio

This comment has been minimized.

Show comment
Hide comment
@turibbio

turibbio Jan 27, 2016

XCode2:
sudo xcode-select -s /Applications/Xcode\ 2.app/Contents/Developer

Pay attention to the "" to escape the space


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.

turibbio commented Jan 27, 2016

XCode2:
sudo xcode-select -s /Applications/Xcode\ 2.app/Contents/Developer

Pay attention to the "" to escape the space


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.

@jesstomo12

This comment has been minimized.

Show comment
Hide comment
@jesstomo12

jesstomo12 Feb 10, 2016

im having this problem what is the password when you do sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

jesstomo12 commented Feb 10, 2016

im having this problem what is the password when you do sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

@davis

This comment has been minimized.

Show comment
Hide comment
@davis

davis Feb 10, 2016

@jesstomo12 your sudo password

davis commented Feb 10, 2016

@jesstomo12 your sudo password

@dharmanibc

This comment has been minimized.

Show comment
Hide comment
@dharmanibc

dharmanibc Mar 14, 2016

I have the same error: "xcode-select: error: invalid developer directory '/Applications/Xcode.app/Contents/Developer'"
I also tried: 1. Install Xcode
2. Run sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
or Run sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
Nothing works. How I know which version of Xcode is loaded?

dharmanibc commented Mar 14, 2016

I have the same error: "xcode-select: error: invalid developer directory '/Applications/Xcode.app/Contents/Developer'"
I also tried: 1. Install Xcode
2. Run sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
or Run sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
Nothing works. How I know which version of Xcode is loaded?

@bnoordhuis

This comment has been minimized.

Show comment
Hide comment
@bnoordhuis

bnoordhuis Mar 14, 2016

Member

@dharmanibc xcode-select -print-path

Member

bnoordhuis commented Mar 14, 2016

@dharmanibc xcode-select -print-path

@dharmanibc

This comment has been minimized.

Show comment
Hide comment
@dharmanibc

dharmanibc Mar 14, 2016

Thanks! The problem is solved now. Actually, this was an map-error on OS X 10.10, as somehow it checks for some module to be available for 10.11 and which is not available for 10.10. So, simply, I ignored the error msg. The fink seems properly installed. Thanks again!

dharmanibc commented Mar 14, 2016

Thanks! The problem is solved now. Actually, this was an map-error on OS X 10.10, as somehow it checks for some module to be available for 10.11 and which is not available for 10.10. So, simply, I ignored the error msg. The fink seems properly installed. Thanks again!

@jalghizzi

This comment has been minimized.

Show comment
Hide comment
@jalghizzi

jalghizzi Mar 29, 2016

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.


This problem happens when xcode-select developer directory was pointing to /Library/Developer/CommandLineTools, when a full regular XCode was required (happens when CLT are installed after XCode)

Solution:

Install Xcode (get it from https://developer.apple.com/xcode/) if you don't have it yet,

Point xcode-select to the Xcode Developer directory using the following command:

sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

Note: Make sure your Xcode app directory is the same as in the address above; most notably, it'll be probably /Applications/Xcode-Beta.app/Contents/Developeror /Applications/Xcode-beta.app/Contents/Developer if you installed beta XCode release instead.

The Source: http://stackoverflow.com/questions/17980759/xcode-select-active-developer-directory-error/17980786#17980786

jalghizzi commented Mar 29, 2016

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.


This problem happens when xcode-select developer directory was pointing to /Library/Developer/CommandLineTools, when a full regular XCode was required (happens when CLT are installed after XCode)

Solution:

Install Xcode (get it from https://developer.apple.com/xcode/) if you don't have it yet,

Point xcode-select to the Xcode Developer directory using the following command:

sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

Note: Make sure your Xcode app directory is the same as in the address above; most notably, it'll be probably /Applications/Xcode-Beta.app/Contents/Developeror /Applications/Xcode-beta.app/Contents/Developer if you installed beta XCode release instead.

The Source: http://stackoverflow.com/questions/17980759/xcode-select-active-developer-directory-error/17980786#17980786

@zhanglun

This comment has been minimized.

Show comment
Hide comment
@zhanglun

zhanglun Jun 18, 2016

I do not want install xcode, it's stupid. How can i do


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.

zhanglun commented Jun 18, 2016

I do not want install xcode, it's stupid. How can i do


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.

@tianshuo

This comment has been minimized.

Show comment
Hide comment
@tianshuo

tianshuo Jun 22, 2016

Why should this force an installation of the overbloated xcode instead of xcode command line tools?


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.

tianshuo commented Jun 22, 2016

Why should this force an installation of the overbloated xcode instead of xcode command line tools?


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.

@rvagg

This comment has been minimized.

Show comment
Hide comment
@rvagg

rvagg Jun 22, 2016

Member

I don't think we have any control over the message this prints, it comes out of OSX.

The best resource I've seen on this whole mess is actually from a rails documentation project: http://railsapps.github.io/xcode-command-line-tools.html, it's pretty complete and we'd do well to either link to it or borrow large chunks of it for our own documentation.


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.

Member

rvagg commented Jun 22, 2016

I don't think we have any control over the message this prints, it comes out of OSX.

The best resource I've seen on this whole mess is actually from a rails documentation project: http://railsapps.github.io/xcode-command-line-tools.html, it's pretty complete and we'd do well to either link to it or borrow large chunks of it for our own documentation.


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.

@sw00

This comment has been minimized.

Show comment
Hide comment
@sw00

sw00 Jul 8, 2016

So, I just want to confirm this.

node-gyp has a hard dependency on XCode (the entire IDE) that cannot be fulfilled by CommandLineTools?


EDIT(gibfahn): No, Command line tools is fine, you don't need the full Xcode. Just ignore the warning. See here and here for more info.

sw00 commented Jul 8, 2016

So, I just want to confirm this.

node-gyp has a hard dependency on XCode (the entire IDE) that cannot be fulfilled by CommandLineTools?


EDIT(gibfahn): No, Command line tools is fine, you don't need the full Xcode. Just ignore the warning. See here and here for more info.

@tianshuo

This comment has been minimized.

Show comment
Hide comment
@tianshuo

tianshuo Jul 8, 2016

Yeah, that's whats really strange

tianshuo commented Jul 8, 2016

Yeah, that's whats really strange

@rvagg

This comment has been minimized.

Show comment
Hide comment
@rvagg

rvagg Jul 8, 2016

Member

no, this is not correct, the commandline tools should be just fine, it's just a matter of wiring up xcode-select to use them by default I think, some kind of OSX magic I don't know off the top of my head


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.

Member

rvagg commented Jul 8, 2016

no, this is not correct, the commandline tools should be just fine, it's just a matter of wiring up xcode-select to use them by default I think, some kind of OSX magic I don't know off the top of my head


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.

@carmelocolon

This comment has been minimized.

Show comment
Hide comment
@carmelocolon

carmelocolon Jul 8, 2016

It Worked! You guys rock. Thanks!

sudo xcode-select -s /Applications/Xcode-Beta.app/Contents/Developer


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.

carmelocolon commented Jul 8, 2016

It Worked! You guys rock. Thanks!

sudo xcode-select -s /Applications/Xcode-Beta.app/Contents/Developer


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.

@patrickcat

This comment has been minimized.

Show comment
Hide comment
@patrickcat

patrickcat Jun 19, 2018

Used command 'sudo xcodebuild -license accept' to accept the license.

patrickcat commented Jun 19, 2018

Used command 'sudo xcodebuild -license accept' to accept the license.

@jonesnc

This comment has been minimized.

Show comment
Hide comment
@jonesnc

jonesnc Jun 27, 2018

@patrickcat when I try to run sudo xcodebuild -license accept, I get the following:

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

jonesnc commented Jun 27, 2018

@patrickcat when I try to run sudo xcodebuild -license accept, I get the following:

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

@npny

This comment has been minimized.

Show comment
Hide comment
@npny

npny Jul 11, 2018

I know this is not the best place for it; but this is the top result on Google, so hopefully this helps other people landing here due to a yarn installor npm install error:

For me, on OSX 10.13.6 High Sierra, node 10.6.0 and npm 6.1.0, this was due to the slightly outdated 3.6.2 version of node-gyp shipped with npm.

TL;DR, I fixed it with

cd /usr/local/Cellar/node/10.6.0/libexec/lib/node_modules/npm/ && npm update node-gyp

Root cause seems to be XcodeVersion() throwing up:

gyp info using node-gyp@3.6.2
gyp info using node@10.6.0 | darwin | x64

[...]

Traceback (most recent call last):

  File "/usr/local/Cellar/node/10.6.0/libexec/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py", line 16, in <module>

[...]

  File "/usr/local/Cellar/node/10.6.0/libexec/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 118, in GetXcodeArchsDefault
    xcode_version, _ = XcodeVersion()

  File "/usr/local/Cellar/node/10.6.0/libexec/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 1265, in XcodeVersion
    version = re.match(r'(\d\.\d\.?\d*)', version).groups()[0]

AttributeError: 'NoneType' object has no attribute 'groups'

As logged above, this happens with node-gyp v3.6.2, but the above regex bug was fixed in v3.6.3:

2  gyp/pylib/gyp/xcode_emulation.py
@@ -1262,7 +1262,7 @@ def XcodeVersion():
   except:
     version = CLTVersion()
     if version:
-      version = re.match(r'(\d\.\d\.?\d*)', version).groups()[0]
+      version = re.match(r'(\d+\.\d+\.?\d*)', version).groups()[0]
     else:
       raise GypError("No Xcode or CLT version detected!")
     # The CLT has no build information, so we return an empty string.

I double-checked that my node and npm were the latest version, but sadly as it turns out npm 6.1.0 still tracks node-gyp 3.6.2.


Therefore, I artifically upgraded

/usr/local/Cellar/node/10.6.0/libexec/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js -v
# v3.6.2

By running

cd /usr/local/Cellar/node/10.6.0/libexec/lib/node_modules/npm/
npm update node-gyp

To get to

/usr/local/Cellar/node/10.6.0/libexec/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js -v
# v3.7.0

At which point I could run my yarn install again without issue.

npny commented Jul 11, 2018

I know this is not the best place for it; but this is the top result on Google, so hopefully this helps other people landing here due to a yarn installor npm install error:

For me, on OSX 10.13.6 High Sierra, node 10.6.0 and npm 6.1.0, this was due to the slightly outdated 3.6.2 version of node-gyp shipped with npm.

TL;DR, I fixed it with

cd /usr/local/Cellar/node/10.6.0/libexec/lib/node_modules/npm/ && npm update node-gyp

Root cause seems to be XcodeVersion() throwing up:

gyp info using node-gyp@3.6.2
gyp info using node@10.6.0 | darwin | x64

[...]

Traceback (most recent call last):

  File "/usr/local/Cellar/node/10.6.0/libexec/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py", line 16, in <module>

[...]

  File "/usr/local/Cellar/node/10.6.0/libexec/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 118, in GetXcodeArchsDefault
    xcode_version, _ = XcodeVersion()

  File "/usr/local/Cellar/node/10.6.0/libexec/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 1265, in XcodeVersion
    version = re.match(r'(\d\.\d\.?\d*)', version).groups()[0]

AttributeError: 'NoneType' object has no attribute 'groups'

As logged above, this happens with node-gyp v3.6.2, but the above regex bug was fixed in v3.6.3:

2  gyp/pylib/gyp/xcode_emulation.py
@@ -1262,7 +1262,7 @@ def XcodeVersion():
   except:
     version = CLTVersion()
     if version:
-      version = re.match(r'(\d\.\d\.?\d*)', version).groups()[0]
+      version = re.match(r'(\d+\.\d+\.?\d*)', version).groups()[0]
     else:
       raise GypError("No Xcode or CLT version detected!")
     # The CLT has no build information, so we return an empty string.

I double-checked that my node and npm were the latest version, but sadly as it turns out npm 6.1.0 still tracks node-gyp 3.6.2.


Therefore, I artifically upgraded

/usr/local/Cellar/node/10.6.0/libexec/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js -v
# v3.6.2

By running

cd /usr/local/Cellar/node/10.6.0/libexec/lib/node_modules/npm/
npm update node-gyp

To get to

/usr/local/Cellar/node/10.6.0/libexec/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js -v
# v3.7.0

At which point I could run my yarn install again without issue.

@LucianLiu6

This comment has been minimized.

Show comment
Hide comment
@LucianLiu6

LucianLiu6 Jul 13, 2018

It works with me on macOS High Sierra, thanks a lot!

LucianLiu6 commented Jul 13, 2018

It works with me on macOS High Sierra, thanks a lot!

@Ruqoyah

This comment has been minimized.

Show comment
Hide comment
@Ruqoyah

Ruqoyah Jul 18, 2018

For me, it was because the JRE folder was not existing for some reason.

I had two JDK installations

  • jdk1.8.0_*
  • jdk_10.*

Somehow, node-gyp rebuild was attempting to use jdk_10.* which had no jre folder.

Fix

Copying the JRE folder from jdk1.8.0_* to jdk_10.*/Contents/Home fixed it for me.

Ruqoyah commented Jul 18, 2018

For me, it was because the JRE folder was not existing for some reason.

I had two JDK installations

  • jdk1.8.0_*
  • jdk_10.*

Somehow, node-gyp rebuild was attempting to use jdk_10.* which had no jre folder.

Fix

Copying the JRE folder from jdk1.8.0_* to jdk_10.*/Contents/Home fixed it for me.

@gregoryyoung2

This comment has been minimized.

Show comment
Hide comment
@gregoryyoung2

gregoryyoung2 Jul 23, 2018

If you only have Xcode-beta installed, install the release version of Xcode too and it should work

gregoryyoung2 commented Jul 23, 2018

If you only have Xcode-beta installed, install the release version of Xcode too and it should work

@JBallin

This comment has been minimized.

Show comment
Hide comment
@JBallin

JBallin Jul 25, 2018

I already have Xcode so I removed CommandLineTools and linked Xcode. Thoughts?

$ sudo rm -rf /Library/Developer/CommandLineTools
$ sudo xcode-select --switch /Applications/Xcode.app

JBallin commented Jul 25, 2018

I already have Xcode so I removed CommandLineTools and linked Xcode. Thoughts?

$ sudo rm -rf /Library/Developer/CommandLineTools
$ sudo xcode-select --switch /Applications/Xcode.app
@ericsoco

This comment has been minimized.

Show comment
Hide comment
@ericsoco

ericsoco Sep 20, 2018

@npny's digging is right on the money. Here's the relevant node-gyp issue.

Xcode Command Line Tools v10.0 (mine landed on my box Sep 17) appears to be incompatible with node-gyp@3.6.2, used by node@8.11.2. I bumped to node@8.12.0 (latest LTS), which pulls node-gyp up to 3.8.0.

npm rebuild <your-busted-package-here> works again \o/

ericsoco commented Sep 20, 2018

@npny's digging is right on the money. Here's the relevant node-gyp issue.

Xcode Command Line Tools v10.0 (mine landed on my box Sep 17) appears to be incompatible with node-gyp@3.6.2, used by node@8.11.2. I bumped to node@8.12.0 (latest LTS), which pulls node-gyp up to 3.8.0.

npm rebuild <your-busted-package-here> works again \o/

@gabitoesmiapodo

This comment has been minimized.

Show comment
Hide comment
@gabitoesmiapodo

gabitoesmiapodo commented Sep 20, 2018

@ericsoco This worked ☝️

@skylarweaver

This comment has been minimized.

Show comment
Hide comment
@skylarweaver

skylarweaver Sep 24, 2018

After the latest High Sierra Command Line Tools update for Xcode 10.0, I needed to uninstall my command line tool:
$ rm -rf /Library/Developer/CommandLineTools

Then reinstall them using the commands at the top of this forum. Researched for hours and that's all I could find that would fix my issue. I also don't have Xcode installed.

skylarweaver commented Sep 24, 2018

After the latest High Sierra Command Line Tools update for Xcode 10.0, I needed to uninstall my command line tool:
$ rm -rf /Library/Developer/CommandLineTools

Then reinstall them using the commands at the top of this forum. Researched for hours and that's all I could find that would fix my issue. I also don't have Xcode installed.

@banacorn

This comment has been minimized.

Show comment
Hide comment
@banacorn

banacorn Sep 25, 2018

@skylarweaver This worked ☝️

banacorn commented Sep 25, 2018

@skylarweaver This worked ☝️

@nick

This comment has been minimized.

Show comment
Hide comment
@nick

nick Oct 1, 2018

For those on Mojave, the following worked for me:

sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

nick commented Oct 1, 2018

For those on Mojave, the following worked for me:

sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

@inklin

This comment has been minimized.

Show comment
Hide comment
@inklin

inklin Oct 4, 2018

@skylarweaver This worked for me. THANK YOU.

inklin commented Oct 4, 2018

@skylarweaver This worked for me. THANK YOU.

@anantgoldie

This comment has been minimized.

Show comment
Hide comment
@anantgoldie

anantgoldie Oct 8, 2018

thanks @jalghizzi - your comment on 29 Mar 2016 worked just fine.

anantgoldie commented Oct 8, 2018

thanks @jalghizzi - your comment on 29 Mar 2016 worked just fine.

@waldyrious

This comment has been minimized.

Show comment
Hide comment
@waldyrious

waldyrious Oct 9, 2018

None of the suggestions above worked for me. It turns out I needed to update npm from 5.6.0 to 6.4.1, which I did with npm i -g npm. After that, running yarn worked correctly and this issue was gone. Indeed, this comment suggests just that, referring to #1370 ("gyp: don't print xcodebuild not found errors"):

Once you update to a version of npm that has a version of node-gyp that has that commit then the warning will go away.

In case it helps, I was setting up a project that required "node": ">=8.0 <10", and had installed it with nvm install 9.

waldyrious commented Oct 9, 2018

None of the suggestions above worked for me. It turns out I needed to update npm from 5.6.0 to 6.4.1, which I did with npm i -g npm. After that, running yarn worked correctly and this issue was gone. Indeed, this comment suggests just that, referring to #1370 ("gyp: don't print xcodebuild not found errors"):

Once you update to a version of npm that has a version of node-gyp that has that commit then the warning will go away.

In case it helps, I was setting up a project that required "node": ">=8.0 <10", and had installed it with nvm install 9.

@aheissenberger

This comment has been minimized.

Show comment
Hide comment
@aheissenberger

aheissenberger Oct 11, 2018

MacOS 10.13.6: upgrading brew and using node 10 fixed the problem for me

aheissenberger commented Oct 11, 2018

MacOS 10.13.6: upgrading brew and using node 10 fixed the problem for me

@robophil

This comment has been minimized.

Show comment
Hide comment
@robophil

robophil Oct 17, 2018

I had to update node-gyp and add it as a dev dependency for this to work after selecting xcode command line tool

# Install Command Line Tools if you haven't already.
# Enable command line tools
# update node-gyp

xcode-select --install
sudo xcode-select --switch /Library/Developer/CommandLineTools

npm i -D node-gyp

robophil commented Oct 17, 2018

I had to update node-gyp and add it as a dev dependency for this to work after selecting xcode command line tool

# Install Command Line Tools if you haven't already.
# Enable command line tools
# update node-gyp

xcode-select --install
sudo xcode-select --switch /Library/Developer/CommandLineTools

npm i -D node-gyp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment