-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
node-gyp rebuild failed on MacOS #1464
Comments
You can ignore that xcode-select error; if you upgrade node-gyp, you won't even see it. What's the actual build error? |
xcode_emulation.py Verbose output
|
Yep, if you upgrade to 3.6.3 or 3.7.0 things should work. I'll go ahead and close this out but let me know if you still have issues after upgrading. |
I just had this problem. After some diagnosis, I was able to just update the version for node-gyp inside the I've never had to edit the file directly before, but mine was throwing the exact same error as the one posted here by realdennis. Mine was Here is the code inside my package-lock.json for reference and context: "node-sass": {
"version": "4.7.2",
"resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.7.2.tgz",
"integrity": "sha512-CaV+wLqZ7//Jdom5aUFCpGNoECd7BbNhjuwdsX/LkXBrHl8eb1Wjw4HvWqcFvhr5KuNgAk8i/myf/MQ1YYeroA==",
"dev": true,
"requires": {
"async-foreach": "^0.1.3",
"chalk": "^1.1.1",
"cross-spawn": "^3.0.0",
"gaze": "^1.0.0",
"get-stdin": "^4.0.1",
"glob": "^7.0.3",
"in-publish": "^2.0.0",
"lodash.assign": "^4.2.0",
"lodash.clonedeep": "^4.3.2",
"lodash.mergewith": "^4.6.0",
"meow": "^3.7.0",
"mkdirp": "^0.5.1",
"nan": "^2.3.2",
"node-gyp": "^3.7.0",
"npmlog": "^4.0.0",
"request": "~2.79.0",
"sass-graph": "^2.2.4",
"stdout-stream": "^1.4.0",
"true-case-path": "^1.0.2"
}, I simply changed it from 3.3 to 3.7 and my |
I'm seeing this with:
I don't have XCode installed, but I do have the Command Line Tools installed. It seems like node-gyp is having an issue determining something about the XCode environment (xcode_emulation.py). I'm installing XCode and will try after that. Any ideas? binding.gyp: https://gist.github.com/aguynamedben/f46b059e5551afebd964da130614d78c Command that is failing:
Error:
macOS version: High Sierra, 10.13.6
|
I'm having the same issue with macOS version: High Sierra, 10.13.6, Node v11.0.0 when running |
@csergiu Can't figure it out. Have been trying various things for 1.5 days now. @richardlau @bnoordhuis Any ideas? Should this be reopened? |
What is the output of |
@aguynamedben are you running it from an IDE terminal by any chance? it seems to work for me now if I run it from iTerm, not sure what bins RubyMine was using. |
|
Running |
Maybe refack/GYP3#1 would address this, or at least provide a more meaningful error message. |
I fixed the
I'm troubleshooting another problem with UPDATE: |
Following up... some combination of installing full XCode and updating my Command Line Tools fixed this for me. |
In case it helps anybody, for me downgrading node (installed with brew) to LTS (v10.13.0) worked. |
deleting my lock file, node_modules folder then reinstalling with |
I'll just install xcode. Not keeping track of every |
I was hopeful one of the above solutions might work, but I'm still unable to get past this. My config: node 10.12.0, npm 6.5.0, node-gyp 3.8.0, Mac Mojave 10.14.2, Xcode 10.1 (and installed its components). I removed node-modules/ and package-lock.json before restarting
|
I've tried several solutions and this one seems working: |
@allanberrocal Your suggestion solved the issue. Thanks! |
I face the same problem ,I got crazy.. I am trying the ways you suggest |
ok, so for me the following worked, when running z-app git:(master) ✗ xcodebuild -version
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance This usually happens when MacOs has an update to Xcode, just open Xcode and see if you need to install some additional stuff, after doing this I was golden. |
|
This helped to fix the issue |
The same issue as @teddis except I have node-pre-gyp instead of node-gyp. I was just trying to run an open source project, didn't know it would turn into this. Any ideas? |
@alexanmtz that link solved it for me! Thanks :) |
changed my node-sass for the last version and Voi la |
I faced this when I updated my macOS to Catalina. It is fixed 🎉
|
For those upgrading to macOS Catalina, please checkout #1940 |
This upgrades node-sass. node-sass uses node-gyp, and the version we were using had a problem with recognising some versions of the xcode command-line tools. See nodejs/node-gyp#1464. Ugrading node-sass has pulled in a newer version of node-gyp and now it works again.
Downgrading from Python3.xx to Python2.xx fixed the issue |
This works for me npm install -g n sudo npm explore npm -g -- npm install node-gyp@latest |
After trying most of the above, what ended up working for me was, believe it or not, simply updating node to the latest version.
Depending on the dependencies of your particular project, you may not be able to use the latest stable version of node, but you can try upgrading to the latest version your project allows and see if it resolves the issue as it did for me. |
@bmfay your solution worked out. Saved my day, thanks! |
This worked for me |
@Vipinunnikrishnan after 2h searching for answers, yours worked for me! Ty |
Verbose output (from npm or node-gyp):
Some strange behavior: When I use the npm script to run the node-gyp would rebuild failed, but
./node_modules/node-gyp/bin/node-gyp.js
will run ok.$ xcode-select -p
/Library/Developer/CommandLineTools
The text was updated successfully, but these errors were encountered: