Skip to content
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 not working #433

Closed
caninojories opened this issue Jan 15, 2015 · 26 comments
Closed

node-gyp rebuild not working #433

caninojories opened this issue Jan 15, 2015 · 26 comments

Comments

@caninojories
Copy link

gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp http GET http://nodejs.org/dist/v1.0.1/node-v1.0.1.tar.gz
gyp http 404 http://nodejs.org/dist/v1.0.1/node-v1.0.1.tar.gz
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: 404 status code downloading tarball
gyp ERR! stack at Request. (/usr/local/lib/node_modules/node-gyp/lib/install.js:246:14)
gyp ERR! stack at Request.emit (events.js:117:20)
gyp ERR! stack at Request.onRequestResponse (/usr/local/lib/node_modules/node-gyp/node_modules/request/request.js:1255:10)
gyp ERR! stack at ClientRequest.emit (events.js:95:17)
gyp ERR! stack at HTTPParser.parserOnIncomingClient (_http_client.js:399:21)
gyp ERR! stack at HTTPParser.parserOnHeadersComplete (_http_common.js:89:23)
gyp ERR! stack at Socket.socketOnData (_http_client.js:290:20)
gyp ERR! stack at Socket.emit (events.js:95:17)
gyp ERR! stack at readableAddChunk (_stream_readable.js:143:16)
gyp ERR! stack at Socket.Readable.push (_stream_readable.js:106:10)
gyp ERR! System Darwin 14.0.0
gyp ERR! command "node" "/usr/local/bin/node-gyp" "rebuild"

@rvagg
Copy link
Member

rvagg commented Jan 15, 2015

yes, this is a problem with node-gyp upstream not supporting io.js yet, we'll be submitting a patch asap but for now you can use the node-gyp that comes bundled with io.js: /usr/local/lib/node_modules/npm/node_modules/node-gyp/ (you could go into that directory and npm link if you want to make it node-gyp global).

@rvagg
Copy link
Member

rvagg commented Jan 15, 2015

leaving this issue open as a reminder that we need to do this

@caninojories
Copy link
Author

thanks

@reklatsmasters
Copy link
Contributor

windows, does not work

gyp ERR! stack Error: 404 status code downloading 32-bit node.lib

@bnoordhuis
Copy link
Member

@reklatsmasters That should have been fixed by 5de334c.

@ralphtheninja
Copy link
Contributor

@bnoordhuis Cool. But it's not in v1.0.1 right?

@bnoordhuis
Copy link
Member

@ralphtheninja Nope, but it will be in v1.0.2.

@ralphtheninja
Copy link
Contributor

@rvagg Thanks for the tip with the link. I had to do

$ cd /usr/local/lib/iojs-v1.0.1-linux-x64/lib/node_modules/npm/node_modules/node-gyp
$ npm link -f

To get rid of the warning

npm ERR! Linux 3.13.0-44-generic
npm ERR! argv "/usr/local/bin/iojs" "/usr/local/bin/npm" "link"
npm ERR! node v1.0.1
npm ERR! npm  v2.1.18
npm ERR! path /usr/local/bin/node-gyp
npm ERR! code EEXIST

npm ERR! Refusing to delete: /usr/local/bin/node-gyp not in /usr/local/lib/iojs-v1.0.1-linux-x64/lib/node_modules/npm/node_modules/node-gyp
File exists: /usr/local/bin/node-gyp
Move it away, and try again. 

@rvagg
Copy link
Member

rvagg commented Jan 17, 2015

WIP nodejs/node-gyp#564

@rvagg
Copy link
Member

rvagg commented Jan 17, 2015

Also just published a fork to give Nate a bit of time to digest and act on the above (and also provide us with a path forward if we can't get a merge): https://github.com/rvagg/pangyp

npm install pangyp -g to get back the functionality you need while we wait if you are doing addon dev.

@Fishrock123
Copy link
Contributor

@caninojories please re-open if you are still having issues post-pangyp. :)

@leecade
Copy link

leecade commented Mar 10, 2015

👍

SamVerschueren added a commit to SamVerschueren/mongoose-seeder that referenced this issue Mar 11, 2015
@liyingzh
Copy link

gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp http GET https://iojs.org/dist/v1.6.3/iojs-v1.6.3.tar.gz
gyp http 404 https://iojs.org/dist/v1.6.3/iojs-v1.6.3.tar.gz
gyp WARN install got an error, rolling back install
gyp ERR! configure error 
gyp ERR! stack Error: 404 status code downloading tarball
gyp ERR! stack     at Request.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/install.js:246:14)
gyp ERR! stack     at emitOne (events.js:82:20)
gyp ERR! stack     at Request.emit (events.js:166:7)
gyp ERR! stack     at Request.onRequestResponse (/usr/local/lib/node_modules/npm/node_modules/node-gyp/node_modules/request/request.js:1139:10)
gyp ERR! stack     at emitOne (events.js:77:13)
gyp ERR! stack     at ClientRequest.emit (events.js:166:7)
gyp ERR! stack     at HTTPParser.parserOnIncomingClient (_http_client.js:410:21)
gyp ERR! stack     at HTTPParser.parserOnHeadersComplete (_http_common.js:88:23)
gyp ERR! stack     at TLSSocket.socketOnData (_http_client.js:300:20)
gyp ERR! stack     at emitOne (events.js:77:13)
gyp ERR! System Linux 3.13.0-45-generic
gyp ERR! command "/usr/local/bin/iojs" "/usr/local/bin/node-gyp" "rebuild" "--debug"
gyp ERR! cwd /home/liying/workspace/node-addon-examples/1_hello_world/node_0.12
gyp ERR! node -v v1.6.3
gyp ERR! node-gyp -v v1.0.3
gyp ERR! not ok 

why https://iojs.org/dist/v1.6.3/iojs-v1.6.3.tar.gz? the latest is https://iojs.org/dist/v1.6.2/iojs-v1.6.2.tar.gz!

@aredridel
Copy link
Contributor

Which version did you install and how?

(what's iojs --version say?)

@liyingzh
Copy link

@aredridel git clone io.js git, then build and make install

~$ iojs --version
v1.6.3

@Fishrock123
Copy link
Contributor

@liyingzh The latest officially released is 1.6.2, yes.

However, the repo get's bumped to the next patch as soon as a version gets released, to say that it is a dev version of what will (probably be*) the next version.

*except in the case that we end up doing a minor version bump due to sermver-minor requiring commits being merged, in which case, it bumps to the minor at release time.

@liyingzh
Copy link

Thank for the info. My solution: checkout v0.1.6.2, then build.

@leecade
Copy link

leecade commented Mar 30, 2015

yes v0.1.6.2 works fine

@s4mli
Copy link

s4mli commented Apr 14, 2015

[email protected] preinstall /Users/xxx/abc/node_modules/cson
node ./cyclic.js

[email protected] install /Users/xxx/abc/node_modules/heapdump
node-gyp rebuild

gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: 404 status code downloading tarball
gyp ERR! stack at Request. (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/install.js:246:14)
gyp ERR! stack at emitOne (events.js:82:20)
gyp ERR! stack at Request.emit (events.js:166:7)
gyp ERR! stack at Request.onRequestResponse (/usr/local/lib/node_modules/npm/node_modules/node-gyp/node_modules/request/request.js:1156:10)
gyp ERR! stack at emitOne (events.js:77:13)
gyp ERR! stack at ClientRequest.emit (events.js:166:7)
gyp ERR! stack at HTTPParser.parserOnIncomingClient (_http_client.js:410:21)
gyp ERR! stack at HTTPParser.parserOnHeadersComplete (_http_common.js:88:23)
gyp ERR! stack at Socket.socketOnData (_http_client.js:300:20)
gyp ERR! stack at emitOne (events.js:77:13)
gyp ERR! System Darwin 14.3.0
gyp ERR! command "/usr/local/bin/iojs" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/samuelwoo/cbt/node_modules/heapdump
gyp ERR! node -v v1.6.2
gyp ERR! node-gyp -v v1.0.3
gyp ERR! not ok

@bnoordhuis
Copy link
Member

@locomote-sam Seems to be the same issue as the OP reported and should be fixed by using the node-gyp that comes with io.js. Did you install io.js first and then installed node.js on top of it?

If you are using the homebrew build, you should report an issue there; they chopped up the build pretty bad, I believe.

@koistya
Copy link

koistya commented May 3, 2015

Is there a workaround for this issue? I'm getting:

gyp ERR! build error
gyp ERR! stack Error: ENOENT: no such file or directory, open 'C:\Users\User\.node-gyp\1.8.1\x64\node.lib'
gyp ERR! stack     at Error (native)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "C:\\Program Files\\iojs\\node.exe" "C:\\Program Files\\iojs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\User\AppData\Roaming\npm\node_modules\jest-cli\node_modules\jsdom\node_modules\contextify
gyp ERR! node -v v1.8.1
node-gyp -v v1.0.3
gyp ERR! not ok
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files\\iojs\\node.exe" "C:\\Program  Files\\iojs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "jest-cli"
npm ERR! node v1.8.1
npm ERR! npm  v2.9.0
npm ERR! code ELIFECYCLE

Maybe, just manually copy C:\Users\<user>\.node-gyp\1.8.1\x64\iojs.lib to C:\Users\<user>\.node-gyp\1.8.1\x64\node.lib?

@binarykitchen
Copy link

I experience this too on Mac OS X and iojs v1.8.1:

> [email protected] install /Users/michael-heuberger/Development/smx3-frontend/node_modules/gulp-jest/node_modules/jest-cli/node_modules/jsdom/node_modules/contextify
> node-gyp rebuild

gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: 404 status code downloading tarball
gyp ERR! stack     at Request.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/install.js:246:14)
gyp ERR! stack     at emitOne (events.js:82:20)
gyp ERR! stack     at Request.emit (events.js:166:7)
gyp ERR! stack     at Request.onRequestResponse (/usr/local/lib/node_modules/npm/node_modules/request/request.js:1139:10)
gyp ERR! stack     at emitOne (events.js:77:13)
gyp ERR! stack     at ClientRequest.emit (events.js:166:7)
gyp ERR! stack     at HTTPParser.parserOnIncomingClient (_http_client.js:412:21)
gyp ERR! stack     at HTTPParser.parserOnHeadersComplete (_http_common.js:88:23)
gyp ERR! stack     at Socket.socketOnData (_http_client.js:302:20)
gyp ERR! stack     at emitOne (events.js:77:13)
gyp ERR! System Darwin 14.3.0
gyp ERR! command "/usr/local/Cellar/iojs/1.8.1/bin/iojs" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/michael-heuberger/Development/smx3-frontend/node_modules/gulp-jest/node_modules/jest-cli/node_modules/jsdom/node_modules/contextify
gyp ERR! node -v v1.8.1
gyp ERR! node-gyp -v v1.0.3
gyp ERR! not ok

@rickdog
Copy link

rickdog commented May 13, 2015

https://www.npmjs.com/package/node-gyp-install for downloading manually iojs libs for node-gyp

@russfrisch
Copy link

@rickdog Thank you! You're a life saver.

@binarykitchen
Copy link

thanks @rickdog, but still, this should be fixed because i dislike installing global npm modules

rmehner added a commit to eHealthAfrica/grunt-tx that referenced this issue Jun 9, 2015
See nodejs/node#433 for more details Since
iojs and node are going to merge eventually, this won't be a problem for
too long..
gagern added a commit to gagern/libxmljs that referenced this issue Jul 10, 2015
The problem with node-gyp not working with iojs can be solved by using the
version shipped with iojs, not the version from the latest npm we install
separately.  See nodejs/node#433 for details.
So we update npm to latest upstream only for old versions of node.js,
not for the current version or for iojs.
@gagern
Copy link
Contributor

gagern commented Jul 10, 2015

If this affects a package being installed on Travis, then often it's due to npm install -g npm being invoked in some form at some point. Since the version of npm shipped with iojs works just fine, one possible solution is omitting that install, or at least making it conditional so it gets skipped if $TRAVIS_NODE_VERSION starts with iojs. Example:

before_install: |
    case ${TRAVIS_NODE_VERSION} in
        iojs*)
            echo "Not upgrading npm for iojs."
            ;;
        *)
            npm update -g npm
            ;;
    esac

nicokaiser added a commit to florajs/datasource-mysql that referenced this issue Aug 11, 2015
nicokaiser added a commit to florajs/datasource-mysql that referenced this issue Aug 11, 2015
nicokaiser added a commit to florajs/datasource-mysql that referenced this issue Aug 11, 2015
nicokaiser added a commit to florajs/datasource-mysql that referenced this issue Aug 11, 2015
Rayman added a commit to Rayman/roslibjs that referenced this issue Sep 10, 2015
Make sure to only update npm in the 0.8 and 0.10 versions to not run
into this issue: nodejs/node#433
Rayman added a commit to Rayman/roslibjs that referenced this issue Sep 10, 2015
Make sure to only update npm in the 0.8 and 0.10 versions to not run
into this issue: nodejs/node#433
Rayman added a commit to Rayman/roslibjs that referenced this issue Sep 14, 2015
Make sure to only update npm in the 0.8 and 0.10 versions to not run
into this issue: nodejs/node#433
Rayman added a commit to Rayman/roslibjs that referenced this issue Sep 29, 2015
Make sure to only update npm in the 0.8 and 0.10 versions to not run
into this issue: nodejs/node#433
bkazic pushed a commit to bkazic/mocha-test that referenced this issue Oct 3, 2015
Rayman added a commit to Rayman/roslibjs that referenced this issue Oct 9, 2015
Make sure to only update npm in the 0.8 and 0.10 versions to not run
into this issue: nodejs/node#433
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests