node-gyp: Error: 404 status code downloading 32-bit node.lib
I recently updated to node 4.0 on Windows 10 and it seems that I am now unable to use modules that rely on node-gyp.
Specifically, my issue is that whenever I try to install a module, I get the following semi-crypitc error:
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: 404 status code downloading 32-bit node.lib
gyp ERR! stack at Request.<anonymous> (C:\Users\Mauve\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\install.js:377:20)
gyp ERR! stack at emitOne (events.js:82:20)
gyp ERR! stack at Request.emit (events.js:169:7)
gyp ERR! stack at Request.onRequestResponse (C:\Users\Mauve\AppData\Roaming\npm\node_modules\npm\node_modules\request\request.js:1008:10)
gyp ERR! stack at emitOne (events.js:77:13)
gyp ERR! stack at ClientRequest.emit (events.js:169:7)
gyp ERR! stack at HTTPParser.parserOnIncomingClient (_http_client.js:415:21)
gyp ERR! stack at HTTPParser.parserOnHeadersComplete (_http_common.js:88:23)
gyp ERR! stack at TLSSocket.socketOnData (_http_client.js:305:20)
gyp ERR! stack at emitOne (events.js:77:13)
gyp ERR! System Windows_NT 10.0.10240
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Mauve\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Mauve\someproject\node_modules\lwip
gyp ERR! node -v v4.0.0
gyp ERR! node-gyp -v v2.0.2
gyp ERR! not ok
npm ERR! Windows_NT 10.0.10240
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Mauve\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "lwip"
npm ERR! node v4.0.0
npm ERR! npm v2.14.3
npm ERR! code ELIFECYCLE
npm ERR! lwip@0.0.6 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the lwip@0.0.6 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the lwip package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls lwip
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\Mauve\someproject\npm-debug.log
It seems like it’s getting a 404 when downloading something, but I’m not sure what I can do about that.
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 21 (4 by maintainers)
OP: your output says
gyp ERR! node-gyp -v v2.0.2
, and anyone else in here who has an alternative npm installed includingYou currently must use the npm that’s bundled with Node v4.0.0, both vanilla npm v2 and npm v3 ship with an older node-gyp which doesn’t know about the new node.lib locations but for Node v4 we’re shipping a patched version that has node-gyp v3 installed. npm will be shipping it soon though (@zkat says npm v2 will get it in next week’s release, I’m not sure about v3).
This is primarily a problem for Windows because of the node.lib location change. All other platforms just need the source tarball which they can get just fine but the newer node-gyp also swaps out the source tarball for a much smaller headers tarball so that’s a bonus.
If you want to try and hack your npm install because you’re somehow stuck on a particular version then you can do this (not supported or necessarily recommended):
C:\Users\Mauve\AppData\Roaming\npm\node_modules\npm
,cd
into that directorynpm install node-gyp@latest
that should bundle the right node-gyp with the version of npm you’re using and it should work
another alternative is to install
node-gyp
globally and use it directly to compile addons, that’s not so convenient when they’re coming as project dependencies though.@everettmuniz Thank you! Your solution worked for me.
I am using nodist so I did
Thanks again.
Installing Node 4.1.2 and NPM 3.3.6 and node-gyp globally only led me to the following very weird error 😕
I had the same issue yesterday. Very new to nodejs but here’s how I fixed it. YMMV.
To the best of my knowledge, that’s updating the version of node-gyp that NPM is using.