Gyp download fails

Folks, since this morning, doing ‘yarn’ fails when gyp is downloading nodejs headers:

gyp ERR! stack Error: 500 response downloading https://nodejs.org/download/release/v10.17.0/node-v10.17.0-headers.tar.gz

Downloading the file from the command line works just fine. Did I miss something here?

[original thread by Thomas Mäder]

To be a bit more precise:

C:\Users\thomas\code\chedev\theia>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" install )  else (node "" install )
gyp info it worked if it ends with ok
gyp info using node-gyp@5.0.3
gyp info using node@10.17.0 | win32 | x64
gyp http GET https://nodejs.org/download/release/v10.17.0/node-v10.17.0-headers.tar.gz
gyp http 500 https://nodejs.org/download/release/v10.17.0/node-v10.17.0-headers.tar.gz
gyp WARN install got an error, rolling back install
gyp ERR! install error
gyp ERR! stack Error: 500 response downloading https://nodejs.org/download/release/v10.17.0/node-v10.17.0-headers.tar.gz

Also doing "curl " works just fine.

do you have some proxy settings like npm config set proxy ? also you can download manually node-v10.17.0-headers.tar.gz and put it in a local folder and then use npm config set tarball ${PATH_TO}/node-v10.17.0-headers.tar.gz (we’re using that approach in offline mode)

I can get the headers now, but now it fails later: when I try curl, I get:

curl https://nodejs.org/download/release/v10.17.0/win-x64/node.lib
<html>
<head><title>500 Internal Server Error</title></head>
<body bgcolor="white">
<center><h1>500 Internal Server Error</h1></center>
<hr><center>nginx</center>
</body>
</html>

on my side it’s still working

 ~/gi/e/theia  master *1  yarn
yarn install v1.21.0
$ node-gyp install
gyp info it worked if it ends with ok
gyp info using node-gyp@6.1.0
gyp info using node@10.16.3 | darwin | x64
gyp http GET https://nodejs.org/download/release/v10.16.3/node-v10.16.3-headers.tar.gz
gyp http 200 https://nodejs.org/download/release/v10.16.3/node-v10.16.3-headers.tar.gz
gyp http GET https://nodejs.org/download/release/v10.16.3/SHASUMS256.txt
gyp http 200 https://nodejs.org/download/release/v10.16.3/SHASUMS256.txt
10.16.3
gyp info ok
curl --output /tmp/node.lib https://nodejs.org/download/release/v10.17.0/win-x64/node.lib 
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 6877k    0 6877k    0     0  14.7M      0 --:--:-- --:--:-- --:--:-- 14.7M

The difference sees to be in the node version: https://nodejs.org/download/release/v10.17.0/win-x64/node.lib

10.17.0 vs 10.16.3

I have no proxies or anything.

For what it’s worth, I rebased on master and now it seems it can download the file in question just fine:
gyp http 200 https://nodejs.org/download/release/v10.17.0/win-x64/node.lib

t.b.h I suspect flakiness on nodejs.org :shrug:

It is flakiness: it works every 3rd time or so :monster_shrug:

It may be a DNS issue as well ?

BTW I tried with v10.17.0 and I always get successful run

Nah, 500 indicates “internal error”. I can resolve the url just fine.

Could be related to https://github.com/eclipse-theia/theia/issues/7507?

Could be…don’t you just love it when the error message says: “not a valid zip file”, but it doesn’t tell you what the fscking file is?

I have seen the node-gyp problem a few times, intermittently in the last few days, maybe last week. `

I suspect flakiness on nodejs.org

+1, me too.

[Kevin Ard]

I ran into enormous trouble with gyp and nsfw today and yesterday. Builds run fine with images based on node:10, though :woman_shrugging:

It should be alright now, please see: https://github.com/Axosoft/nsfw/issues/109#issuecomment-611187167