This repository has been archived by the owner. It is now read-only.

Path error when building Node.js (gyp + xcodebuild) #19424

baliw opened this Issue Apr 25, 2013 · 13 comments


None yet
4 participants

baliw commented Apr 25, 2013

I'm using homebrew to install Node.js. I've updated to the April 2013 release of Apple command line tools. I've also done a brew update. brew doctor reports "Your system is ready to brew.".

However, when I do brew install -v node I get the following error:

Error: Can't run /usr/bin/usr/bin/xcodebuild (no such file).

gyp: Error 1 running xcodebuild
Error running GYP

I've seen this issue listed here a year ago and someone solved it by installing the full xcode distribution. I don't need the full xcode distribution, just the command line tools. Is there a way around this without installing the full xcode distribution?

It worked fine when I installed Node 0.8.17 a couple months ago. So this seems like it might be a bug that has crept back into the flow.


mistydemeo commented Apr 25, 2013

Can you post your brew --config, please?

Just to verify, you were trying to build 0.10.5?

baliw commented Apr 25, 2013

Yes, I was installing 0.10.5

brew --config

HEAD: df7f810a1625a10400e4082b527b9ae7ddf268e5
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: dual-core 64-bit sandybridge
OS X: 10.8.3-x86_64
GCC-4.2: build 5666
LLVM-GCC: build 2336
Clang: 4.2 build 425
X11: N/A
System Ruby: 1.8.7-358
Perl: /usr/bin/perl
Python: /usr/bin/python
Ruby: /usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby

mistydemeo commented Apr 25, 2013

Heh, and I thought that was fixed.

Can you try this:

baliw commented Apr 25, 2013

So I copied that gist to /usr/local/Library/Formula over the existing node.rb file then tried again. Now I'm getting a different errors.

base:~ dan$ brew install node
==> Downloading
Already downloaded: /Library/Caches/Homebrew/node-0.10.5.tar.gz
==> Patching
patching file tools/gyp/pylib/gyp/
==> ./configure --prefix=/usr/local/Cellar/node/0.10.5
==> make install
    copyfile(src, dst)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/", line 81, in copyfile
    with open(src, 'rb') as fsrc:
IOError: [Errno 2] No such file or directory: 'out/Release/node'
make: *** [install] Error 1


mistydemeo commented Apr 25, 2013

Can you provide the full build logs please?

baliw commented Apr 25, 2013

Just noticed the new error.

Error: No developer directory found at /Developer. Run /usr/bin/xcode-select to update the developer directory path.

My /usr/share/xcode-select/xcode_dir_path does specify /Developer.

But I didn't set that up. I guess that's the default.


mistydemeo commented Apr 25, 2013

Thanks. Can you try again with:

brew install

baliw commented Apr 25, 2013

That last forumla worked! Thanks so much! :-)


mistydemeo commented Apr 25, 2013

Great! I'll take this patch upstream to the gyp people then. Hopefully we can get this fixed there so this doesn't happen again.


adamv commented Apr 28, 2013

Should we carry this patch in the meanwhile?


mistydemeo commented Apr 28, 2013

Yeah, I'll push that.

Paxa commented Jun 24, 2013

waste my weekend fighting with
Error: Can't run /usr/bin/usr/bin/xcodebuild (no such file).

So solution is: sudo xcode-select -switch /

@handyman5 handyman5 pushed a commit to handyman5/homebrew that referenced this issue Oct 7, 2013

@mistydemeo mistydemeo node: patch gyp to remove Xcode dependency
Fixes #19424.

@xu-cheng xu-cheng locked and limited conversation to collaborators Feb 16, 2016

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.