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

Random HTTP 500 statuses or ECONNRESET when node-gyp fetches dependencies #2847

Open
rchennafi opened this issue May 15, 2023 · 19 comments
Open

Comments

@rchennafi
Copy link

rchennafi commented May 15, 2023

This is occurring across multiple node versions, architectures and system types. Our build system regularly runs node gyp in its build for our NPM packages across every version of nodejs and about 5% of builds are subject to a 500 status failure or an ECONNRESET when setting up node-gyp.

This strikes me as an issue with the server which hosts the node gyp files. Is there possibly a way around downloading these node-gyp dependencies each time? Or maybe something that can be done to fix the instability there?

These builds all took place inside of Amazon server instances.

Here is an instance on node 14 with node gyp 7.1.2 on a Windows Server 2019 machine.

04:08:09  gyp info ok 
04:08:13  Now using node v14.21.2 (64-bit)
04:08:19  gyp info it worked if it ends with ok
04:08:19  gyp info using node-gyp@7.1.2
04:08:19  gyp info using node@14.21.2 | win32 | x64
04:08:19  gyp info find Python using Python version 3.8.5 found at "C:\Python38\python3.exe"
04:08:23  gyp http GET https://nodejs.org/download/release/v14.21.2/node-v14.21.2-headers.tar.gz
04:08:23  gyp http 200 https://nodejs.org/download/release/v14.21.2/node-v14.21.2-headers.tar.gz
04:08:25  gyp http GET https://nodejs.org/download/release/v14.21.2/SHASUMS256.txt
04:08:25  gyp http GET https://nodejs.org/download/release/v14.21.2/win-x86/node.lib
04:08:25  gyp http GET https://nodejs.org/download/release/v14.21.2/win-x64/node.lib
04:08:25  gyp http GET https://nodejs.org/download/release/v14.21.2/win-arm64/node.lib
04:08:25  gyp http 200 https://nodejs.org/download/release/v14.21.2/SHASUMS256.txt
04:08:26  gyp http 500 https://nodejs.org/download/release/v14.21.2/win-arm64/node.lib
04:08:26  gyp WARN install got an error, rolling back install
04:08:26  gyp ERR! configure error 
04:08:26  gyp ERR! stack Error: 500 status code downloading arm64 node.lib
04:08:26  gyp ERR! stack     at Request.<anonymous> (C:\nvm\v14.21.2\node_modules\node-gyp\lib\install.js:335:22)
04:08:26  gyp ERR! stack     at Request.emit (events.js:412:35)
04:08:26  gyp ERR! stack     at Request.onRequestResponse (C:\nvm\v14.21.2\node_modules\node-gyp\node_modules\request\request.js:1059:10)
04:08:26  gyp ERR! stack     at ClientRequest.emit (events.js:400:28)
04:08:26  gyp ERR! stack     at HTTPParser.parserOnIncomingClient (_http_client.js:647:27)
04:08:26  gyp ERR! stack     at HTTPParser.parserOnHeadersComplete (_http_common.js:127:17)
04:08:26  gyp ERR! stack     at TLSSocket.socketOnData (_http_client.js:515:22)
04:08:26  gyp ERR! stack     at TLSSocket.emit (events.js:400:28)
04:08:26  gyp ERR! stack     at addChunk (internal/streams/readable.js:293:12)
04:08:26  gyp ERR! stack     at readableAddChunk (internal/streams/readable.js:267:9)
04:08:26  gyp ERR! System Windows_NT 10.0.17763
04:08:26  gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--msvs_version=2017" "--devdir=C:\\tmp\\.gyp"

Here is an instance of it occurring on Linux ARM64 with electron & node 16 and node-gyp 9.2.0.

02:06:10  gyp info it worked if it ends with ok
02:06:10  gyp info using node-gyp@9.2.0
02:06:10  gyp info using node@16.19.0 | linux | arm64
02:06:10  gyp info find Python using Python version 3.6.8 found at "/usr/bin/python3"
02:06:10  gyp http GET https://electronjs.org/headers/v9.0.0/node-v9.0.0-headers.tar.gz
02:06:11  gyp WARN install got an error, rolling back install
02:06:11  gyp ERR! configure error 
02:06:11  gyp ERR! stack FetchError: request to https://www.electronjs.org/headers/v9.0.0/node-v9.0.0-headers.tar.gz failed, reason: read ECONNRESET
02:06:11  gyp ERR! stack     at ClientRequest.<anonymous> (/home/pdftron/.nvm/versions/node/v16.19.0/lib/node_modules/node-gyp/node_modules/minipass-fetch/lib/index.js:130:14)
02:06:11  gyp ERR! stack     at ClientRequest.emit (node:events:513:28)
02:06:11  gyp ERR! stack     at TLSSocket.socketErrorListener (node:_http_client:494:9)
02:06:11  gyp ERR! stack     at TLSSocket.emit (node:events:525:35)
02:06:11  gyp ERR! stack     at emitErrorNT (node:internal/streams/destroy:157:8)
02:06:11  gyp ERR! stack     at emitErrorCloseNT (node:internal/streams/destroy:122:3)
02:06:11  gyp ERR! stack     at processTicksAndRejections (node:internal/process/task_queues:83:21)
02:06:11  gyp ERR! System Linux 5.10.0-12-cloud-arm64
02:06:11  gyp ERR! command "/home/pdftron/.nvm/versions/node/v16.19.0/bin/node" "/home/pdftron/.nvm/versions/node/v16.19.0/bin/node-gyp" "rebuild" "--target=v9.0.0" "--dist-url=https://electronjs.org/headers" "--openssl_fips=" "--arch=arm"
02:06:11  gyp ERR! cwd /home/admin/jenkins/workspace/Node_Linux_Electron_Arm64_master/WebPDFWorker/Node.js/Packaging
02:06:11  gyp ERR! node -v v16.19.0
02:06:11  gyp ERR! node-gyp -v v9.2.0
02:06:11  gyp ERR! not ok 

And on Linux x64 with node 9, node-gyp 5.1.1

01:50:03  Now using node v9.11.2 (npm v5.6.0)
01:50:03  gyp info it worked if it ends with ok
01:50:03  gyp info using node-gyp@5.1.1
01:50:03  gyp info using node@9.11.2 | linux | x64
01:50:03  gyp info find Python using Python version 2.7.5 found at "/usr/bin/python"
01:50:03  gyp http GET https://nodejs.org/download/release/v9.11.2/node-v9.11.2-headers.tar.gz
01:50:03  gyp http 500 https://nodejs.org/download/release/v9.11.2/node-v9.11.2-headers.tar.gz
01:50:03  gyp WARN install got an error, rolling back install
01:50:03  gyp ERR! configure error 
01:50:03  gyp ERR! stack Error: 500 response downloading https://nodejs.org/download/release/v9.11.2/node-v9.11.2-headers.tar.gz
01:50:03  gyp ERR! stack     at Request.<anonymous> (/home/pdftron/.nvm/versions/node/v9.11.2/lib/node_modules/node-gyp/lib/install.js:188:14)
01:50:03  gyp ERR! stack     at Request.emit (events.js:185:15)
01:50:03  gyp ERR! stack     at Request.onRequestResponse (/home/pdftron/.nvm/versions/node/v9.11.2/lib/node_modules/node-gyp/node_modules/request/request.js:1059:10)
01:50:03  gyp ERR! stack     at ClientRequest.emit (events.js:180:13)
01:50:03  gyp ERR! stack     at HTTPParser.parserOnIncomingClient (_http_client.js:540:21)
01:50:03  gyp ERR! stack     at HTTPParser.parserOnHeadersComplete (_http_common.js:117:17)
01:50:03  gyp ERR! stack     at TLSSocket.socketOnData (_http_client.js:445:20)
01:50:03  gyp ERR! stack     at TLSSocket.emit (events.js:180:13)
01:50:03  gyp ERR! stack     at addChunk (_stream_readable.js:274:12)
01:50:03  gyp ERR! stack     at readableAddChunk (_stream_readable.js:261:11)
01:50:03  gyp ERR! System Linux 5.10.0-19-cloud-amd64
01:50:03  gyp ERR! command "/home/pdftron/.nvm/versions/node/v9.11.2/bin/node" "/home/pdftron/.nvm/versions/node/v9.11.2/bin/node-gyp" "rebuild"
01:50:03  gyp ERR! cwd /home/admin/jenkins/workspace/PDFNetNode_Linux_master/WebPDFWorker/Node.js/Packaging
01:50:03  gyp ERR! node -v v9.11.2
01:50:03  gyp ERR! node-gyp -v v5.1.1
01:50:03  gyp ERR! not ok

These were just the instances I was able to find within the last 2 weeks of our daily build system. If you want more specific details about each machine I can provide those. The Linux builds are all run within Docker containers.

@cclauss cclauss changed the title Random HTTP 500 statuses or ECONNRESET when node-gyp fetches dependencies Random HTTP 500 statuses or ECONNRESET when node-gyp@7.1.2 fetches dependencies May 15, 2023
@cclauss cclauss added the ERR! node-gyp -v < v10.x.x npm install -g npm label May 15, 2023
@cclauss
Copy link
Contributor

cclauss commented May 15, 2023

Python 3.6 (and soon 3.7) is no longer supported... https://devguide.python.org/versions

Node versions < 16 are no longer supported... https://github.com/nodejs/Release#nodejs-release-working-group

@rchennafi
Copy link
Author

@cclauss
This occurs across all version and types regardless of node/python versions sporadically. Here is a log for Node 19 & Python 3.8.5 on Windows.

03:35:25  gyp info ok 
03:35:29  Now using node v19.5.0 (64-bit)
03:35:41  gyp info it worked if it ends with ok
03:35:41  gyp info using node-gyp@9.3.1
03:35:41  gyp info using node@19.5.0 | win32 | x64
03:35:44  gyp info find Python using Python version 3.8.5 found at "C:\Python38\python3.exe"
03:35:52  gyp http GET https://nodejs.org/download/release/v19.5.0/node-v19.5.0-headers.tar.gz
03:35:53  gyp http 200 https://nodejs.org/download/release/v19.5.0/node-v19.5.0-headers.tar.gz
03:37:14  gyp http GET https://nodejs.org/download/release/v19.5.0/SHASUMS256.txt
03:37:14  gyp http GET https://nodejs.org/download/release/v19.5.0/win-x86/node.lib
03:37:14  gyp http GET https://nodejs.org/download/release/v19.5.0/win-x64/node.lib
03:37:14  gyp http GET https://nodejs.org/download/release/v19.5.0/win-arm64/node.lib
03:37:14  gyp http 404 https://nodejs.org/download/release/v19.5.0/win-arm64/node.lib
03:37:14  gyp http 200 https://nodejs.org/download/release/v19.5.0/win-x64/node.lib
03:37:14  gyp http 200 https://nodejs.org/download/release/v19.5.0/SHASUMS256.txt
03:37:15  gyp http 200 https://nodejs.org/download/release/v19.5.0/win-x86/node.lib
03:42:22  gyp WARN install got an error, rolling back install
03:42:22  gyp ERR! configure error 
03:42:22  gyp ERR! stack Error: aborted
03:42:22  gyp ERR! stack     at connResetException (node:internal/errors:717:14)
03:42:22  gyp ERR! stack     at TLSSocket.socketCloseListener (node:_http_client:456:19)
03:42:22  gyp ERR! stack     at TLSSocket.emit (node:events:524:35)
03:42:22  gyp ERR! stack     at node:net:316:12
03:42:22  gyp ERR! stack     at TCP.done (node:_tls_wrap:588:7)
03:42:22  gyp ERR! System Windows_NT 10.0.17763
03:42:22  gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--msvs_version=2017" "--devdir=C:\\tmp\\.gyp"
03:42:22  gyp ERR! cwd C:\Jenkins\workspace\PDFNetNode_Windows_master\WebPDFWorker\Node.js\Packaging
03:42:22  gyp ERR! node -v v19.5.0
03:42:22  gyp ERR! node-gyp -v v9.3.1
03:42:22  gyp ERR! not ok 

@cclauss
Copy link
Contributor

cclauss commented May 16, 2023

@cclauss cclauss changed the title Random HTTP 500 statuses or ECONNRESET when node-gyp@7.1.2 fetches dependencies Random HTTP 500 statuses or ECONNRESET when node-gyp fetches dependencies May 16, 2023
@StefanStojanovic
Copy link
Contributor

03:37:14 gyp http 404 https://nodejs.org/download/release/v19.5.0/win-arm64/node.lib

This is expected because win-arm64 is part of official releases starting with v19.9.0. However, if HTTP status code 403 or 404 is received for downloading node.lib that should not be a problem according to this code.

03:37:15  gyp http 200 https://nodejs.org/download/release/v19.5.0/win-x86/node.lib
03:42:22  gyp WARN install got an error, rolling back install

Based on this part of the log, an installer error happened 5 minutes after downloading all of the node.lib files and SHASUMS256.txt

@rchennafi
Copy link
Author

Another one here for windows and supported versions. This occurred today.

06:05:52  Now using node v18.14.0 (64-bit)
06:06:04  gyp info it worked if it ends with ok
06:06:04  gyp info using node-gyp@9.3.1
06:06:04  gyp info using node@18.14.0 | win32 | x64
06:06:05  gyp info find Python using Python version 3.8.5 found at "C:\Python38\python3.exe"
06:06:10  gyp http GET https://nodejs.org/download/release/v18.14.0/node-v18.14.0-headers.tar.gz
06:06:11  gyp http 200 https://nodejs.org/download/release/v18.14.0/node-v18.14.0-headers.tar.gz
06:06:20  gyp http GET https://nodejs.org/download/release/v18.14.0/SHASUMS256.txt
06:06:20  gyp http GET https://nodejs.org/download/release/v18.14.0/win-x86/node.lib
06:06:20  gyp http GET https://nodejs.org/download/release/v18.14.0/win-arm64/node.lib
06:06:20  gyp http GET https://nodejs.org/download/release/v18.14.0/win-x64/node.lib
06:06:20  gyp http 200 https://nodejs.org/download/release/v18.14.0/SHASUMS256.txt
06:06:20  gyp http 500 https://nodejs.org/download/release/v18.14.0/win-arm64/node.lib
06:06:20  gyp WARN install got an error, rolling back install
06:06:21  gyp ERR! configure error 
06:06:21  gyp ERR! stack Error: 500 status code downloading arm64 node.lib
06:06:21  gyp ERR! stack     at C:\nvm\v18.14.0\node_modules\node-gyp\lib\install.js:256:17
06:06:21  gyp ERR! stack     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
06:06:21  gyp ERR! stack     at async Promise.all (index 2)
06:06:21  gyp ERR! stack     at async go (C:\nvm\v18.14.0\node_modules\node-gyp\lib\install.js:189:5)
06:06:21  gyp ERR! stack     at async install (C:\nvm\v18.14.0\node_modules\node-gyp\lib\install.js:62:18)
06:06:21  gyp ERR! System Windows_NT 10.0.17763
06:06:21  gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--msvs_version=2017" "--devdir=C:\\tmp\\.gyp"
06:06:21  gyp ERR! cwd C:\Jenkins\workspace\PDFNetNode_Windows_9.5\WebPDFWorker\Node.js\Packaging
06:06:21  gyp ERR! node -v v18.14.0
06:06:21  gyp ERR! node-gyp -v v9.3.1
06:06:21  gyp ERR! not ok 

@cclauss
Copy link
Contributor

cclauss commented May 16, 2023

Is this now only a Window issue?

@cclauss cclauss added Windows Arm and removed ERR! node-gyp -v < v10.x.x npm install -g npm labels May 16, 2023
@rchennafi
Copy link
Author

It is most consistent on Windows and Windows is probably the main pain point. The last few logs I've linked are all x64 so not specifically ARM either. Last night we had 4 windows builds all fail around 4:00 AM PST across different node versions with various ECONNRESET and 500 errors.

Some context here, we have node builds for electron and node each for Mac, Windows and Linux. This ends up being about 18 builds per night each running node 8->19 and for electron, 11->22.

@StefanStojanovic
Copy link
Contributor

Status code 500, unlike 403 and 404 fails the installation, as seen from #2847 (comment) since no time passes between those two logs. The error is thrown from here.

I'm not sure this is a Windows-specific issue, especially not an ARM-on-Windows issue. Getting HTTP 500 and ECONNRESET seems more like an issue in communication with the server from which the binaries are downloaded than anything else.

@StefanStojanovic
Copy link
Contributor

A quick update on this topic: I've investigated this issue more and found a way to improve Windows installation to decrease network traffic. I have a PoC, but since it changes the install.js script, I'm waiting for #2846 to land. Afterward, I'll rebase, resolve potential conflicts and open the PR.

StefanStojanovic added a commit to JaneaSystems/node-gyp that referenced this issue May 26, 2023
Instead of downloading node.lib for all architectures, just download the
one that will be needed. Install.js changed to enable downloading just
node.lib for node versions that already have tarball downloaded and
extracted. Not fetching lib now fails the installation. Increased
installVersion because of the changes.

Refs: nodejs#2847
StefanStojanovic added a commit to JaneaSystems/node-gyp that referenced this issue Jun 6, 2023
Instead of downloading node.lib for all architectures, just download the
one that will be needed. Install.js changed to enable downloading just
node.lib for node versions that already have tarball downloaded and
extracted. Not fetching lib now fails the installation. Increased
installVersion because of the changes.

Refs: nodejs#2847
StefanStojanovic added a commit that referenced this issue Jun 9, 2023
Instead of downloading node.lib for all architectures, just download the
one that will be needed. Install.js changed to enable downloading just
node.lib for node versions that already have tarball downloaded and
extracted. Not fetching lib now fails the installation. Increased
installVersion because of the changes.

Refs: #2847
cclauss pushed a commit to cclauss/node-gyp that referenced this issue Jun 13, 2023
Instead of downloading node.lib for all architectures, just download the
one that will be needed. Install.js changed to enable downloading just
node.lib for node versions that already have tarball downloaded and
extracted. Not fetching lib now fails the installation. Increased
installVersion because of the changes.

Refs: nodejs#2847
@jfirebaugh
Copy link

This happens regularly on linux in CI for me:

#20 158.9 npm ERR! gyp http GET https://nodejs.org/download/release/v18.16.0/node-v18.16.0-headers.tar.gz
#20 158.9 npm ERR! gyp http 200 https://nodejs.org/download/release/v18.16.0/node-v18.16.0-headers.tar.gz
#20 158.9 npm ERR! gyp WARN install got an error, rolling back install
#20 158.9 npm ERR! gyp ERR! configure error
#20 158.9 npm ERR! gyp ERR! stack Error: aborted
#20 158.9 npm ERR! gyp ERR! stack     at connResetException (node:internal/errors:717:14)
#20 158.9 npm ERR! gyp ERR! stack     at TLSSocket.socketCloseListener (node:_http_client:462:19)
#20 158.9 npm ERR! gyp ERR! stack     at TLSSocket.emit (node:events:525:35)
#20 158.9 npm ERR! gyp ERR! stack     at node:net:322:12
#20 158.9 npm ERR! gyp ERR! stack     at TCP.done (node:_tls_wrap:588:7)
#20 158.9 npm ERR! gyp ERR! System Linux 5.15.110-70.143.amzn2.x86_64
#20 158.9 npm ERR! gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
#20 158.9 npm ERR! gyp ERR! cwd /src/livegraph/node_modules/posix
#20 158.9 npm ERR! gyp ERR! node -v v18.16.0
#20 158.9 npm ERR! gyp ERR! node-gyp -v v9.3.1
#20 158.9 npm ERR! gyp ERR! not ok

@rchennafi
Copy link
Author

I too experienced significant amounts of failures today when it came to downloading the node headers for Linux builds.

07:52:21  gyp ERR! stack Error: 500 response downloading https://nodejs.org/download/release/v8.17.0/node-v8.17.0-headers.tar.gz
07:52:21  gyp ERR! stack     at Request.<anonymous> (/home/pdftron/.nvm/versions/node/v8.17.0/lib/node_modules/node-gyp/lib/install.js:188:14)
07:52:21  gyp ERR! stack     at emitOne (events.js:121:20)
07:52:21  gyp ERR! stack     at Request.emit (events.js:211:7)
07:52:21  gyp ERR! stack     at Request.onRequestResponse (/home/pdftron/.nvm/versions/node/v8.17.0/lib/node_modules/node-gyp/node_modules/request/request.js:1059:10)
07:52:21  gyp ERR! stack     at emitOne (events.js:116:13)
07:52:21  gyp ERR! stack     at ClientRequest.emit (events.js:211:7)
07:52:21  gyp ERR! stack     at HTTPParser.parserOnIncomingClient (_http_client.js:552:21)
07:52:21  gyp ERR! stack     at HTTPParser.parserOnHeadersComplete (_http_common.js:119:17)
07:52:21  gyp ERR! stack     at TLSSocket.socketOnData (_http_client.js:454:20)
07:52:21  gyp ERR! stack     at emitOne (events.js:116:13)

@avedmala
Copy link

avedmala commented Jul 31, 2023

Experienced this in Windows today

Since two others experienced this today, could this just be some issue with nodejs.org downloads? But it also seems like this is a common issue with node-headers or node.lib...

npm ERR! gyp http 200 https://nodejs.org/download/release/v18.12.1/SHASUMS256.txt
npm ERR! gyp http 500 https://nodejs.org/download/release/v18.12.1/win-x86/node.lib
npm ERR! gyp WARN install got an error, rolling back install
npm ERR! gyp ERR! configure error 
npm ERR! gyp ERR! stack Error: 500 status code downloading ia32 node.lib
npm ERR! gyp ERR! stack     at C:\Program Files (x86)\npm\8.19.2\node_modules\npm\node_modules\node-gyp\lib\install.js:256:17
npm ERR! gyp ERR! stack     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
npm ERR! gyp ERR! stack     at async Promise.all (index 0)
npm ERR! gyp ERR! stack     at async go (C:\Program Files (x86)\npm\8.19.2\node_modules\npm\node_modules\node-gyp\lib\install.js:189:5)
npm ERR! gyp ERR! stack     at async install (C:\Program Files (x86)\npm\8.19.2\node_modules\npm\node_modules\node-gyp\lib\install.js:62:18)
npm ERR! gyp ERR! System Windows_NT 10.0.14393
npm ERR! gyp ERR! command "C:\\Program Files (x86)\\nodejs\\18.12.1\\node.exe" "C:\\Program Files (x86)\\npm\\8.19.2\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd C:\home\site\wwwroot\node_modules\unix-dgram
npm ERR! gyp ERR! node -v v18.12.1
npm ERR! gyp ERR! node-gyp -v v9.1.0
npm ERR! gyp ERR! not ok

@randomvlad
Copy link

Same here. About 30% of our Jenkins automation jobs (Amazon Linux 2) were failing today.

15:31:41  error /home/jenkins/agent/workspace/potato-tests/node_modules/node-expat: Command failed.
15:31:41  Exit code: 1
15:31:41  Command: node-gyp rebuild
15:31:41  Arguments: 
15:31:41  Directory: /home/jenkins/agent/workspace/potato-tests/node_modules/node-expat
15:31:41  Output:
15:31:41  gyp WARN install got an error, rolling back install
15:31:41  gyp ERR! configure error 
15:31:41  gyp ERR! stack Error: 500 response downloading https://nodejs.org/download/release/v14.15.0/node-v14.15.0-headers.tar.gz
15:31:41  gyp ERR! stack     at Request.<anonymous> (/home/jenkins/agent/workspace/potato-tests/node_modules/node-gyp/lib/install.js:188:14)
15:31:41  gyp ERR! stack     at Request.emit (events.js:327:22)
15:31:41  gyp ERR! stack     at Request.onRequestResponse (/home/jenkins/agent/workspace/potato-tests/node_modules/request/request.js:1059:10)
15:31:41  gyp ERR! stack     at ClientRequest.emit (events.js:315:20)
15:31:41  gyp ERR! stack     at HTTPParser.parserOnIncomingClient (_http_client.js:641:27)
15:31:41  gyp ERR! stack     at HTTPParser.parserOnHeadersComplete (_http_common.js:126:17)
15:31:41  gyp ERR! stack     at TLSSocket.socketOnData (_http_client.js:509:22)
15:31:41  gyp ERR! stack     at TLSSocket.emit (events.js:315:20)
15:31:41  gyp ERR! stack     at addChunk (_stream_readable.js:309:12)
15:31:41  gyp ERR! stack     at readableAddChunk (_stream_readable.js:284:9)
15:31:41  gyp ERR! System Linux 5.4.247-162.350.amzn2.x86_64
15:31:41  gyp ERR! command "/usr/local/bin/node" "/home/jenkins/agent/workspace/potato-tests/node_modules/.bin/node-gyp" "rebuild"
15:31:41  gyp ERR! cwd /home/jenkins/agent/workspace/potato-tests/node_modules/node-expat
15:31:41  gyp ERR! node -v v14.15.0
15:31:41  gyp ERR! node-gyp -v v5.1.1
15:31:41  gyp ERR! not ok
15:31:41  info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

@cclauss
Copy link
Contributor

cclauss commented Aug 1, 2023

gyp ERR! node-gyp -v v5.1.1

???

@rchennafi
Copy link
Author

It really does seem like there's simply an issue with the nodejs website and serving these files. I'm unsure if fixing this even lies within the scope of node-gyp beyond the initial changes that were made.

@jevasco
Copy link

jevasco commented Sep 5, 2023

We are also seeing this random issue in our CI.

> node-gyp rebuild

gyp WARN install got an error, rolling back install
gyp ERR! configure error 
gyp ERR! stack Error: 500 status code downloading checksum
gyp ERR! stack     at Request.<anonymous> (/xxx/node/v14.17.5/lib/node_modules/npm/node_modules/node-gyp/lib/install.js:273:18)
gyp ERR! stack     at Request.emit (events.js:412:35)
gyp ERR! stack     at Request.onRequestResponse (/xxx/node/v14.17.5/lib/node_modules/npm/node_modules/request/request.js:1066:10)
gyp ERR! stack     at ClientRequest.emit (events.js:400:28)
gyp ERR! stack     at HTTPParser.parserOnIncomingClient (_http_client.js:647:27)
gyp ERR! stack     at HTTPParser.parserOnHeadersComplete (_http_common.js:126:17)
gyp ERR! stack     at TLSSocket.socketOnData (_http_client.js:515:22)
gyp ERR! stack     at TLSSocket.emit (events.js:400:28)
gyp ERR! stack     at addChunk (internal/streams/readable.js:290:12)
gyp ERR! stack     at readableAddChunk (internal/streams/readable.js:265:9)
gyp ERR! System Darwin 20.5.0
gyp ERR! command "/xxx/node/v14.17.5/bin/node" "/Users/distiller/.nvm/versions/node/v14.17.5/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /xxx/node/v14.17.5/lib/node_modules/appdmg/node_modules/macos-alias
gyp ERR! node -v v14.17.5
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok 
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! macos-alias@0.2.11 install: `node-gyp rebuild`
npm ERR! Exit status 1

@cclauss
Copy link
Contributor

cclauss commented Sep 6, 2023

gyp ERR! node -v v14.17.5

Node.js v14 and soon v16 are no longer supported. https://nodejs.dev/en/about/releases

gyp ERR! node-gyp -v v5.1.0

https://github.com/nodejs/node-gyp/tree/main/docs#readme

@cclauss cclauss closed this as completed Sep 6, 2023
@cclauss cclauss added the ERR! node-gyp -v < v10.x.x npm install -g npm label Sep 6, 2023
staltz pushed a commit to nodejs-mobile/nodejs-mobile-gyp that referenced this issue Feb 21, 2024
* gyp: update gyp to 0.2.1

PR-URL: nodejs/node-gyp#2092
Reviewed-By: Rod Vagg <rod@vagg.org>

* deps: replace mkdirp with {recursive} mkdir

only supported on Node.js 10+

Closes: #2084
PR-URL: nodejs/node-gyp#2123
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>

* doc: update acid test and introduce curl|bash test script

PR-URL: nodejs/node-gyp#2105
Reviewed-By: Rod Vagg <rod@vagg.org>

* doc: update catalina xcode clt download link

PR-URL: nodejs/node-gyp#2133
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Christian Clauss <cclauss@me.com>

* v7.0.0: bump version and update changelog

PR-URL: nodejs/node-gyp#2124

* deps: increase "engines" to "node" : ">= 10.12.0"

Makes npm warn users if they are using an unsupported Node version.

Refs: nodejs/node-gyp#2123
PR-URL: nodejs/node-gyp#2153
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>

* doc: silence curl for macOS Catalina acid test

PR-URL: nodejs/node-gyp#2150
Reviewed-By: Rod Vagg <rod@vagg.org>

* docs: note that node-gyp@7 should solve Catalina CLT issues

PR-URL: nodejs/node-gyp#2156
Reviewed-By: Christian Clauss <cclauss@me.com>

* build: support apple silicon (arm64 darwin) builds

Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
PR-URL: nodejs/node-gyp#2165

* gyp: update gyp to 0.4.0

Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
PR-URL: nodejs/node-gyp#2165

* build: add update-gyp script

Co-authored-by: Christian Clauss <cclauss@me.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Christian Clauss <cclauss@me.com>
PR-URL: nodejs/node-gyp#2167

* v7.1.0: bump version and update changelog

* doc: drop the --production flag for installing windows-build-tools

This isn't needed, and was probably copy-pasted from
windows-build-tools' README.md, which has since been changed
to drop the `--production` flag from the install instructions.

PR-URL: nodejs/node-gyp#2206
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Christian Clauss <cclauss@me.com>
Reviewed-By: Rod Vagg <rod@vagg.org>

* ci: switch to GitHub Actions

Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: Matias Lopez <imatlopez@gmail.com>
PR-URL: nodejs/node-gyp#2210
Closes: #2127
Closes: #2209

* doc: replace status badges with new Actions badge

PR-URL: nodejs/node-gyp#2218
Reviewed-By: Christian Clauss <cclauss@me.com>
Reviewed-By: Matias Lopez <imatlopez@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>

* test: GitHub Actions: Test on Python 3.9

From python: [3.6, 3.7, 3.8] --> python: [3.6, 3.8, 3.9] because if things work on Python 3.6 and 3.8 then they should work on 3.7.

https://www.python.org/downloads/release/python-390/
PR-URL: nodejs/node-gyp#2230
Reviewed-By: Shelley Vohr <shelley.vohr@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>

* lib: better log message when ps fails

PR-URL: nodejs/node-gyp#2229
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
Reviewed-By: Rod Vagg <rod@vagg.org>

* gyp: update gyp to 0.6.1

Closes: nodejs/node-gyp#2236
PR-URL: nodejs/node-gyp#2238
Reviewed-By: Christian Clauss <cclauss@me.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>

* deps: update deps to match npm@7

PR-URL: nodejs/node-gyp#2240
Reviewed-By: Richard Lau <riclau@uk.ibm.com>

* v7.1.1: bump version and update changelog

PR-URL: nodejs/node-gyp#2239
Reviewed-By: Christian Clauss <cclauss@me.com>

* doc: add cmd to reset `xcode-select` to initial state

PR-URL: nodejs/node-gyp#2235
Reviewed-By: Christian Clauss <cclauss@me.com>

* gyp: update gyp to 0.6.2

Refs: https://github.com/nodejs/gyp-next/releases/tag/v0.6.2
PR-URL: nodejs/node-gyp#2241
Reviewed-By: Rod Vagg <rod@vagg.org>

* v7.1.1: bump version and update changelog

PR-URL: nodejs/node-gyp#2242

* doc: add missing `sudo` to Catalina doc

PR-URL: nodejs/node-gyp#2244
Reviewed-By: Rod Vagg <rod@vagg.org>

* ci: migrate deprecated grammar (#2285)

PR-URL: nodejs/node-gyp#2285
Reviewed-By: Richard Lau <rlau@redhat.com>

* doc: updated README.md to copy easily (#2281)

PR-URL: nodejs/node-gyp#2281
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>

* gyp: update gyp to v0.7.0 (#2284)

PR-URL: nodejs/node-gyp#2284
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Christian Clauss <cclauss@me.com>

* doc: update macOS_Catalina.md (#2293)

PR-URL: nodejs/node-gyp#2293
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>

* gyp: update gyp to v0.8.0 (#2318)

PR-URL: nodejs/node-gyp#2318
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>

* lib: avoid changing process.config (#2322)

PR-URL: nodejs/node-gyp#2322
Refs: nodejs/node#36902
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Rod Vagg <rod@vagg.org>

* gyp: remove support for Python 2 (#2300)

PR-URL: nodejs/node-gyp#2300
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>

* lib: migrate requests to fetch (#2220)

PR-URL: nodejs/node-gyp#2220
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>

* lib: drop Python 2 support in find-python.js (#2333)

Co-authored-by: Christian Clauss <cclauss@me.com>

PR-URL: nodejs/node-gyp#2333
Reviewed-By: Christian Clauss <cclauss@me.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>

* ci: update actions/setup-node to v2 (#2302)

PR-URL: nodejs/node-gyp#2302
Reviewed-By: Christian Clauss <cclauss@me.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>

* doc: add downloads badge (#2352)

PR-URL: nodejs/node-gyp#2352
Reviewed-By: Christian Clauss <cclauss@me.com>
Reviewed-By: Richard Lau <rlau@redhat.com>

* deps: sync mutual dependencies with npm

Sync with npm 7.7.0

PR-URL: nodejs/node-gyp#2348
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>

* gyp: Improve our flake8 linting tests

PR-URL: nodejs/node-gyp#2356
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>

* gyp: update gyp to v0.8.1 (#2355)

PR-URL: nodejs/node-gyp#2355
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Christian Clauss <cclauss@me.com>

* v8.0.0: bump version and update changelog

* doc: fix v8.0.0 release date

PR-URL: nodejs/node-gyp#2346

* meta: add `release-please-action` for automated releases (#2395)

Co-authored-by: gengjiawen <technicalcute@gmail.com>

* lib: fail gracefully if we can't find the username (#2375)

* lib: log as yes/no whether build dir was created (#2370)

This bit of logging apparently expected to be given a boolean, but was
receiving either a path or undefined based on the result of fs.mkdir.

Now it prints either "Yes" or "No",
rather than printing either a path or "undefined", respectively.

* doc: Update README.md Visual Studio Community page polski to auto (#2371)

changed URL of Visual Studio Community from a default polski URL to the one without the lenguage code

* doc: remove redundant version info (#2403)

* feat(gyp): update gyp to v0.9.1 (#2402)

* chore: release 8.1.0 (#2418)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* lib: deep-copy process.config during configure (#2368)

* fix: change default gyp update message (#2420)

* fix: add error arg back into catch block for older Node.js users

* chore: fix typos discovered by codespell (#2442)

* Initial Commit

* doc(wiki): Created "binding.gyp" files out in the wild (markdown)

* doc(wiki): Updated "binding.gyp" files out in the wild (markdown)

* doc(wiki): Updated "binding.gyp" files out in the wild (markdown)

* doc(wiki): fixed node-serialport link

* doc(wiki): Updated "binding.gyp" files out in the wild (markdown)

* doc(wiki): Updated "binding.gyp" files out in the wild (markdown)

* doc(wiki): add bcrypt

* doc(wiki): change bcrypt url to binding.gyp file

* doc(wiki): Updated "binding.gyp" files out in the wild (markdown)

* doc(wiki): add one more example

* doc(wiki): Add a link to the node-midi binding.gyp file.

* doc(wiki): Updated "binding.gyp" files out in the wild (markdown)

* doc(wiki): Adds node-inotify and v8-profiler

* doc(wiki): Updated "binding.gyp" files out in the wild (markdown)

* doc(wiki): Adds node-fann

* doc(wiki): Add node-canvas

* doc(wiki): Updated "binding.gyp" files out in the wild (markdown)

* doc(wiki): Created Linking to OpenSSL (markdown)

* doc(wiki): Updated Home (markdown)

* doc(wiki): Updated "binding.gyp" files out in the wild (markdown)

* doc(wiki): Updated Linking to OpenSSL (markdown)

* doc(wiki): added levelup

* doc(wiki): Updated "binding.gyp" files out in the wild (markdown)

* doc(wiki): Updated "binding.gyp" files out in the wild (markdown)

* doc(wiki): Updated "binding.gyp" files out in the wild (markdown)

* doc(wiki): Created Updating npm's bundled node gyp (markdown)

* doc(wiki): Updated Updating npm's bundled node gyp (markdown)

* doc(wiki): Updated Updating npm's bundled node gyp (markdown)

* doc(wiki): Updated Updating npm's bundled node gyp (markdown)

* doc(wiki): Updated Updating npm's bundled node gyp (markdown)

* doc(wiki): Created Visual Studio 2010 Setup (markdown)

* doc(wiki): Updated Home (markdown)

* doc(wiki): Created Common issues (markdown)

* doc(wiki): Updated Home (markdown)

* doc(wiki): Add helpful information

* doc(wiki): Created Error: "pre" versions of node cannot be installed (markdown)

* doc(wiki): Updated Error: "pre" versions of node cannot be installed (markdown)

* doc(wiki): Updated Home (markdown)

* doc(wiki): fix link to gyp file used to build libsqlite3

* doc(wiki): Updated "binding.gyp" files out in the wild (markdown)

* doc(wiki): Bumping Python version from 2.3 to 2.7 as per the node-gyp readme

* doc(wiki): Add node-openvg-canvas and node-openvg.

* doc(wiki): Updated Home (markdown)

* doc(wiki): Adding link to node-cryptopp's gyp file

* doc(wiki): Updated Linking to OpenSSL (markdown)

* doc(wiki): add topcube, node-osmium, and node-osrm

* doc(wiki): Created use of undeclared identifier 'TypedArray' (markdown)

* doc(wiki): Created Visual studio 2012 setup (markdown)

* doc(wiki): Destroyed Visual studio 2012 setup (markdown)

* doc(wiki): Correcting the link to node-osmium

* doc(wiki): Updated "binding.gyp" files out in the wild (markdown)

* doc(wiki): Fix link to node-zipfile

* doc(wiki): Explicit link to Visual C++ 2010 Express

* doc(wiki): Added tip about resolving frustrating LNK1181 error

* doc(wiki): Updated node-levelup to node-leveldown (broken links)

* doc(wiki): Added details for properly fixing

* doc(wiki): Updated "binding.gyp" files out in the wild (markdown)

* doc(wiki): Added nk-mysql (nodamysql)

* doc(wiki): Added nk-xrm-installer .gyp references, including .py scripts for providing complete reference to examples of fetching source via http, extracting, and moving files (as opposed to copying)

* doc(wiki): Note: VS2010 seems to be no longer available!  VS2013 or nothing!

* doc(wiki): node-sass in the wild

* doc(wiki): Clarification + direct link to VS2010

* doc(wiki): Updated Updating npm's bundled node gyp (markdown)

* doc(wiki): Updated "binding.gyp" files out in the wild (markdown)

* doc(wiki): if ouns that the -h did not help. I founs on github that there was support for visual studio 2015, while i couldn't install node-red beacuse it kept telling me the key 2015 was missing. looking in he gyp python code i found the local file was bot up t dat with the github repo. updating took several efforts before i tried to drop the -g option.

* doc(wiki): sorry, forgot to mention a specific windows version.

* doc(wiki): Updated "binding.gyp" files out in the wild (markdown)

* doc(wiki): Added Ghostscript4JS

* doc(wiki): I highly missing it in common issue as every windows biggner face that issue

* doc(wiki): ADDED: Node.js binding to OpenCV

* doc(wiki): Updated "binding.gyp" files out in the wild (markdown)

* doc(wiki): Adding the sharp library to the list

* doc(wiki): node-srs was a 404

* doc(wiki): C++ build tools version upgraded

* doc(wiki): Destroyed Visual Studio 2010 Setup (markdown)

* doc(wiki): Updated Home (markdown)

* doc(wiki): Lower case L

* doc(wiki): Updated "binding.gyp" files out in the wild (markdown)

* doc(wiki): Make changes discussed in nodejs/node-gyp#2416

* doc(wiki): Drop  in favor of

* doc(wiki): Different commands for Windows npm v6 vs. v7

* doc(wiki): Improve Unix instructions

* doc(wiki): Updated Updating npm's bundled node gyp (markdown)

* doc(wiki): If permissions error, please try  and then the command.

* doc(wiki): move wiki docs into doc/

* doc(wiki): link to docs/ from README

* doc(wiki): safer doc names, remove unnecessary TypedArray doc

* ci: GitHub Actions Test on node: [12.x, 14.x, 16.x] (#2439)

* Add title to node-gyp version document (#2452)

* Add title to node-gyp version document

* Update Updating-npm-bundled-node-gyp.md

* fix: doc how to update node-gyp independently from npm

* fix: missing spaces

* ISSUE_TEMPLATE.md: Instructions for old versions (#2470)

* ISSUE_TEMPLATE.md: Instructions for old versions

Also, add a caution about `node sass` being deprecated.

* Update .github/ISSUE_TEMPLATE.md

Co-authored-by: Rod Vagg <rod@vagg.org>

Co-authored-by: Rod Vagg <rod@vagg.org>

* chore(deps): bump tar from 6.1.0 to 6.1.2 (#2474)

Addresses GHSA-3jfq-g458-7qm9 and GHSA-r628-mhmh-qjhw

* doc: correct link to "binding.gyp files out in the wild" (#2483)

correct link to "binding.gyp files out in the wild"

* feat(gyp): update gyp to v0.9.6 (#2481)

* chore: release 8.2.0

* chore: refactor the creation of config.gypi file

* test: Python 3.10 was release on Oct. 4th (#2504)

* chore(deps): bump make-fetch-happen from 8.0.14 to 9.1.0

The breaking change in this module was a cache parameter that `node-gyp`
is not using, so this module is not affected.

* feat(gyp): update gyp to v0.10.0 (#2521)

* chore: release 8.3.0

* feat: support vs2022 (#2533)

* feat: build with config.gypi from node headers

* chore: release 8.4.0

* docs: fix typo in powershell node-gyp update

* deps: npmlog@6.0.0

* fix: windows command missing space (#2553)

* chore: release 8.4.1

* chore: add minimal SECURITY.md (#2560)

* doc: Rename and update Common-issues.md --> docs/README.md (#2567)

Update the common problems to track with current issues on this repo and shorten the URL to just https://github.com/nodejs/node-gyp/tree/master/docs

* docs: title match content (#2574)

* docs: Add notes/disclaimers for upgrading the copy of node-gyp that npm uses (#2585)

* docs: rephrase explanation of which node-gyp is used by npm (#2587)

* doc: Update Python versions (#2571)

* Add Python 3.10
* Drop Python 3.6 which [EOLs on 23 Dec. 2021](https://devguide.python.org/#status-of-python-branches)
* macOS: clarify `Xcode Command Line Tools` standalone vs. from full Xcode
* Window: Use the same URL as https://github.com/nodejs/node/blob/master/BUILDING.md#windows

* deps!: increase "engines" to "node" : "^12.22 || ^14.13 || >=16" (#2601)

Makes npm warn users if they are using an unsupported Node version.

* deps: make-fetch-happen@10.0.1

The breaking change was dropping node10 support, which node-gyp has
already done.

* fix: update make-fetch-happen to a minimum of 10.0.3

* added node-heapdump binding.gyp

* fix: _ in npm_config_ env variables

* lib: add lib.target as path for searching libnode on z/OS

* chore: release 9.0.0

* test: Upgrade GitHub Actions (#2623)

* doc: update docs/README.md with latest version number

* fix: typo on readme

* fix: new ca & server certs, bundle in .js file and unpack for testing

bundling in certs.js rather than including the raw files should avoid some
false positives that low-quality security scanners keep on complaining about.

* fix: extend tap timeout length to allow for slow CI

* Add Python symlink to path (for non-Windows OSes only) (#2362)

* lib: create a Python symlink and add it to PATH

Helps to ensure a version of Python validated by lib/find-python.js
is used to run various Python scripts generated by gyp.

Known to affect gyp-mac-tool, probably affects gyp-flock-tool as well.

These Python scripts (such as `gyp-mac-tool`) are invoked directly,
via the generated Makefile, so their shebang lines determine
which Python binary is used to run them.
The shebang lines of these scripts are all `#!/usr/bin/env python3`,
so the first `python3` on the user's PATH will be used.

By adding a symlink to the Python binary validated by find-python.js,
and putting this symlink first on the PATH, we can ensure we use
a compatible version of Python to run these scripts.

(Only on Unix/Unix-like OSes. Symlinks are tricky on Windows,
and Python isn't used at build-time anyhow on Windows,
so this intervention isn't useful or necessary on Windows.

A similar technique for Windows, no symlinks required,
would be to make batch scripts which execute the target binary,
much like what Node does for its bundled copy of npm on Windows.)

* test: update mocked graceful-fs for configure test

Add missing functions "unlink()" and "symlink()" to mocked module.

* lib: log any errors when creating Python symlink

Warn users about errors, but continue on in case the user does
happen to have new enough Python on their PATH.

(The symlinks are only meant to fix an issue in a corner case,
where the user told `node-gyp` where new enough Python is,
but it's not the first `python3` on their PATH.
We should not introduce a new potential failure mode to all users
when fixing this bug. So no hard errors during the symlink process.)

* lib: improve error formatting for Python symlink

Logging the entire error object shows the stack twice,
and all the other information is contained in the stack.

It also messes with the order of what is logged.

Rather than logging a bunch of redundant information in a messy way,
we can log only the stack. Logging it in a separate log.warn()
also gets rid of an extra space character at the beginning of the line.

* lib: restore err.errno to logs for symlink errors

This info (err.errno) is the only piece of information
in the error object that is not redundant to err.stack.

* lib: use log.verbose, not log.warn

These messages aren't important enough to be `log.warn`s.

Log as verbose only; they will also appear in full error output.

* Clarify wording to redirect to macOS_Catalina.md (#2588)

* build: update due to rename of primary branch

* Migrate macOS acid test from master to main (#2686)

Follow-on to #2495

* feat: Update function getSDK() to support Windows 11 SDK (#2565)

* test: Upgrade GitHub Actions (#2701)

* test: Upgrade GitHub Actions

* node: 18x --> 18.x

* test: Try msvs-version: [2016, 2019, 2022] (#2700)

* test: Try msvs-version: [2016, 2019, 2022]

* main, not master

* Don't npm audit fix --force

* fix: re-label (#2689)

* chore: release 9.1.0

* lib: enable support for zoslib on z/OS (#2600)

Check if zos-base.h is in the directory identified by environment
variable ZOSLIB_INCLUDES if set; otherwise search for it from a set of
candidates under nodeRootDir. Then pass it as
-Dzoslib_include_dir=<path-found> to gyp_main.py for use in common.gypi
to set 'includes_dir' when compiling addons.

Co-authored-by: Gaby Baghdadi <baghdadi@ca.ibm.com>

Co-authored-by: Gaby Baghdadi <baghdadi@ca.ibm.com>

* chore: update dependency - nopt@6.0.0 (#2707)

No functional changes, just dropping old node versions from engines,
linting, and fixing CI.

* fix: node.js debugger adds stderr (but exit code is 0) -> shouldn't throw (#2719)

* fix: node.js debugger adds stderr (but exit code is 0) -> shouldn't throw

* input.py: subprocess.Popen() -> subprocess.run()

* feat(gyp): update gyp to v0.13.0

* feat: Add proper support for IBM i

Python 3.9 on IBM i now properly returns "os400" for sys.platform
instead of claiming to be AIX as it did previously. While the IBM i PASE
environment is compatible with AIX, it is a subset and has numerous
differences which makes it beneficial to distinguish, however this means
that it now needs explicit support here.

* Adding tarfile member sanitization to extractall() (#2741)

Co-authored-by: TrellixVulnTeam <kasimir.schulz@trellix.com>

* chore: release 9.2.0 (#2735)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* feat: support IBM Open XL C/C++ on z/OS (#2743)

* feat: remove support for VS2015 in Node.js >=19 (#2746)

* feat(gyp): update gyp to v0.14.0 (#2749)

* chore: release 9.3.0

* Add Python 3.11 to the testing

https://docs.python.org/3/whatsnew/3.11.html

* ci: update python test matrix (#2774)

* ci: drop python 3.6 from test matrix

* Update .github/workflows/tests.yml

Co-authored-by: Christian Clauss <cclauss@me.com>

Co-authored-by: Christian Clauss <cclauss@me.com>

* fix: increase node 12 support to ^12.13 (#2771)

* chore: release 9.3.1

* feat: Upgrade Python linting from flake8 to ruff (#2815)

[Ruff](https://beta.ruff.rs/) supports [over 500 lint rules](https://beta.ruff.rs/docs/rules) including bandit, isort, pylint, pyupgrade, and flake8 plus its plugins and is written in Rust for speed.

This GitHub Action will provide contributors with intuitive GitHub Annotations.

![image](https://user-images.githubusercontent.com/3709715/223758136-afc386d2-70aa-4eff-953a-2c2d82ceea23.png)

The `Required` in the checks below should be:
1. Removed from `flake8-annotation` and added to `ruff-annotation` which replaces it.
2. Removed from `isort` and added to `ruff` which replaces it.

* Improved advise on repacing node-sass with sass (#2758)

* Improved advise on repacing node-sass with sass

* Update README.md

* chore: get update-gyp.py to work with Python >= v3.5 (#2826)

* chore: get update-gyp.py to work with Python v3.9

* Ruff ignore rule PLC1901

---------

Co-authored-by: Christian Clauss <cclauss@me.com>

* doc: Update README.md (#2822)

Co-authored-by: Christian Clauss <cclauss@me.com>

* update make-fetch-happen to 11.0.3 (#2796)

http-cache-semantics 4.1.0 is vulnerable

https://www.cve.org/CVERecord?id=CVE-2022-25881

* docs: docs/README.md add advise about deprecated node-sass (#2828)

* feat: add support for native windows arm64 build tools

Visual Studio 2022 17.4 adds a native C++ compiler for Windows on ARM.
This allows arm64 devices to leverage native build tools, leading to
a 35% (or more) speed increase.
https://devblogs.microsoft.com/visualstudio/arm64-visual-studio-is-officially-here/

Signed-off-by: Dennis Ameling <dennis@dennisameling.com>

* fix: extract tarball to temp directory on Windows (#2846)

* fix: check for errors while extracting downloaded tarball

Signed-off-by: David Sanders <dsanders11@ucsbalum.com>

* test: parallel installs

Signed-off-by: David Sanders <dsanders11@ucsbalum.com>

* fix: extract tarball to temp directory on Windows

Signed-off-by: David Sanders <dsanders11@ucsbalum.com>

---------

Signed-off-by: David Sanders <dsanders11@ucsbalum.com>

* Migration from tap to mocha (#2851)

* migrate from tap to mocha

After make-fetch-happen update GitHub Actions started failing. Migrating
from tap to mocha testing framework for GitHub Action stability.

* write custom test reporter for more verbose output

Implemented a simple custom mocha test reporter to replace the default
one. Made test report more developer friendly.

* fix: log statement is for devDir not nodedir (#2840)

Signed-off-by: David Sanders <dsanders11@ucsbalum.com>

* win,install: only download target_arch node.lib (#2857)

Instead of downloading node.lib for all architectures, just download the
one that will be needed. Install.js changed to enable downloading just
node.lib for node versions that already have tarball downloaded and
extracted. Not fetching lib now fails the installation. Increased
installVersion because of the changes.

Refs: nodejs/node-gyp#2847

* test: remove deprecated Node.js and Python (#2868)

* test: remove deprecated node.js and python

Removed Node.js v14.x and Python v3.7. Also added Node.js v20.x.

* Update .github/workflows/tests.yml

Co-authored-by: Christian Clauss <cclauss@me.com>

---------

Co-authored-by: Christian Clauss <cclauss@me.com>

* chore: release 9.4.0

* Sync deps and engines with npm (#2770)

* feat!: update `engines.node` to `^14.17.0 || ^16.13.0 || >=18.0.0`

* deps: nopt@^7.0.0

* feat: replace npmlog with proc-log

* deps: standard@17.0.0 and fix linting errors

* deps: which@3.0.0
- this also promiisifies the build command

* deps: glob@8.0.3

* feat: drop rimraf dependency

* fix: use fs/promises in favor of fs.promises

* lib: find python checks order changed on windows (#2872)

These changes favor py launcher over other checks excluding command line
or npm configuration and environment variable checks.

Also, updated supported python versions list.

Fixes: nodejs/node-gyp#2871

* Fix reading msvs version on Windows (#2644)

* fix: fix reading msvs version on windows

* docs: Update windows installation instructions in README.md (#2882)

* Update windows installation instructions in README.md

* Fix Python lint error by using an f-string (#2886)

* test: increase mocha timeout (#2887)

* fix: create Python symlink only during builds, and clean it up after (#2721)

* fix: create Python symlink only during builds, and clean it up after

Previously in b9ddcd5 this was created
during configuration, and the symlink persisted indefinitely. This
causes problems with many tools that do not expect a codebase to include
symlinks to external absolute paths.

This PR largely reverts that commit, and instead writes the path to
link to into the config, and then creates the symlink only temporarily
during the build process, always deleting it afterwards.

* assert install_path == self.output, f"{install_path} != {self.output}"

---------

Co-authored-by: Christian Clauss <cclauss@me.com>

* docs: README.md Do not hardcode the supported versions of Python (#2880)

* Fix incorrect Xcode casing in README (#2896)

* test: update expired certs (#2908)

* doc: Add note about Python symlinks (PR 2362) to CHANGELOG.md for 9.1.0 (#2783)

The PR for this change was merged without a prefixed name,
such as "lib:" or "fix:". That means release-please
didn't include it in the changelog for v9.1.0.

This change did end up affecting users, though. (See issue 2713
and PR 2721). Therefore, I believe it should be noted
in the CHANGELOG.md, so users can better understand the behavior
they are seeing.

* Python lint: ruff --format is now --output-format

Fixes the failing `ruff` linting in GitHub Actions.

* chore: GitHub Workflows security hardening (#2740)

* build: harden tests.yml permissions

Signed-off-by: Alex <aleksandrosansan@gmail.com>

* build: harden release-please.yml permissions

Signed-off-by: Alex <aleksandrosansan@gmail.com>

* build: harden visual-studio.yml permissions

Signed-off-by: Alex <aleksandrosansan@gmail.com>

* Update release-please.yml

---------

Signed-off-by: Alex <aleksandrosansan@gmail.com>

* chore: empty commit to add changelog entries from #2770

feat!: update engines.node to ^14.17.0 || ^16.13.0 || >=18.0.0
deps: nopt@^7.0.0
feat: replace npmlog with proc-log
deps: standard@17.0.0 and fix linting errors
deps: which@3.0.0
fix: promisify build command
deps: glob@8.0.3
feat: drop rimraf dependency
fix: use fs/promises in favor of fs.promises

* docs: update applicable GitHub links from master to main (#2843)

Signed-off-by: David Sanders <dsanders11@ucsbalum.com>

* feat(gyp): update gyp to v0.16.1 (#2923)

* feat(gyp): update gyp to v0.15.1

* Add Python 3.12 to tests

* Try to fix CI

* Try specifying msvs-version

* Modify the visual-studio matrix

* Fix pythonLocation var

* Fix Python tests

* Get path

* polish

* feat(gyp): update gyp to v0.16.0

* feat(gyp): update gyp to v0.16.1

* CI: Don't install Python 'packaging' module (vendored in 'gyp-next' now)

* Apply suggestions from code review

* Upgrade to actions/checkout@v4

---------

Co-authored-by: Raymond Zhao <7199958+rzhao271@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>

* chore: add check engines script to CI (#2922)

* deps: glob@10.3.10 (#2926)

* deps: make-fetch-happen@13.0.0 (#2927)

* deps: which@4.0.0 (#2928)

* feat!: drop node 14 support (#2929)

BREAKING CHANGE: `node-gyp` now supports node `^16.14.0 || >=18.0.0`

* feat: convert all internal functions to async/await

BREAKING CHANGE: All internal functions have been coverted to return
promises and no longer accept callbacks. This is not a breaking change
for users but may be breaking to consumers of `node-gyp` if you are
requiring internal functions directly.

* feat: convert internal classes from util.inherits to classes

BREAKING CHANGE: the `Gyp` class exported is now created using
ECMAScript classes and therefore might have small differences to classes
that were previously created with `util.inherits`.

* chore: misc testing fixes (#2930)

* chore: misc test fixes

* Sort test runs by os first

* Use cross-env for test env var

* Try sorting matrix params

* Make FAST_TEST the default and rename to FULL_TEST

* Separate helper functions to not need to export test obj in files

* feat!: use .npmignore file to limit which files are published (#2921)

* feat!: use package.json files to limit which files are published

Fixes: #2372

* Use npmignore instead of package.json#files

* Add update-gyp.py to npmignore

* Add install to pack test

* Use output var for pack dir

* Move existing .gitignore entries to .npmignore

* Sort git and npm ignores

* Update and cleanup workflows

* chore: run tests after release please PR

* chore: release 10.0.0 (#2920)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* chore: add parallel test logging

* chore: lint fixes

* chore: use platform specific timeouts in tests

* fix: use local `util` for `findAccessibleSync()`

The `findAccessibleSync()` function is in the local `util` module
instead of Node.js' builtin `util` module.

* chore: release 10.0.1

* Fix wrong changes that were on repo before merge

* fix: output path generation for iOS

---------

Signed-off-by: Dennis Ameling <dennis@dennisameling.com>
Signed-off-by: David Sanders <dsanders11@ucsbalum.com>
Signed-off-by: Alex <aleksandrosansan@gmail.com>
Co-authored-by: Ujjwal Sharma <ryzokuken@disroot.org>
Co-authored-by: Rod Vagg <rod@vagg.org>
Co-authored-by: Dario Vladovic <d.vladimyr@gmail.com>
Co-authored-by: DeeDeeG <DeeDeeG@users.noreply.github.com>
Co-authored-by: Chia Wei Ong <ongchiawei@gmail.com>
Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: Matias Lopez <imatlopez@gmail.com>
Co-authored-by: Martin Midtgaard <martin.midtgaard@gmail.com>
Co-authored-by: Valera Rozuvan <valera.rozuvan@gmail.com>
Co-authored-by: Myles Borins <mylesborins@github.com>
Co-authored-by: Karl Horky <karl.horky@gmail.com>
Co-authored-by: Jiawen Geng <3759816+gengjiawen@users.noreply.github.com>
Co-authored-by: மனோஜ்குமார் பழனிச்சாமி <smartmanoj42857@gmail.com>
Co-authored-by: iMrLopez <8272737+iMrLopez@users.noreply.github.com>
Co-authored-by: Michaël Zasso <targos@protonmail.com>
Co-authored-by: Matias Lopez <imatlopez@users.noreply.github.com>
Co-authored-by: Sora Morimoto <sora@morimoto.io>
Co-authored-by: gengjiawen <technicalcute@gmail.com>
Co-authored-by: Gustavo de León <alfonso.gus.deleon@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Livia Rett <30511433+liviarett@users.noreply.github.com>
Co-authored-by: TooTallNate <nathan@tootallnate.net>
Co-authored-by: milani <mrtz.milani@googlemail.com>
Co-authored-by: Psychless <jbeal24@gmail.com>
Co-authored-by: mixu <mikito.takada@gmail.com>
Co-authored-by: shtylman <shtylman@gmail.com>
Co-authored-by: lloyd <lloyd@hilaiel.com>
Co-authored-by: bolgovr <bolgovr@gmail.com>
Co-authored-by: justinlatimer <justinlatimer@gmail.com>
Co-authored-by: kkaefer <github@kkaefer.com>
Co-authored-by: c4milo <camilo.aguilar@gmail.com>
Co-authored-by: lperrin <laurent.perrin@gmail.com>
Co-authored-by: oransel <oransel@yahoo.com>
Co-authored-by: voodootikigod <chris@iterativedesigns.com>
Co-authored-by: ehansin <ericc72@hotmail.com>
Co-authored-by: xverges <xverges@gmail.com>
Co-authored-by: Niggler <nirk.niggler@gmail.com>
Co-authored-by: felquis <frgformenton@gmail.com>
Co-authored-by: Dane Springmeyer <dane@dbsgeo.com>
Co-authored-by: Alex Treppass <alextreppass@gmail.com>
Co-authored-by: Luis Reis <luis.m.reis@gmail.com>
Co-authored-by: lilo003 <lilo@c37.co>
Co-authored-by: Syrian watermelon <AhmadBenmrad@users.noreply.github.com>
Co-authored-by: Evan Su <hexacyanide@gmail.com>
Co-authored-by: fov42550564 <42550564@qq.com>
Co-authored-by: tcbeutler <tcbeutler@gmail.com>
Co-authored-by: raztus <raztus@gmail.com>
Co-authored-by: vweevers <mail@vincentweevers.nl>
Co-authored-by: Andreas Brekken <a@abrkn.com>
Co-authored-by: ralphtheninja <ralphtheninja@riseup.net>
Co-authored-by: Zeke Sonxx <zeke@zekesonxx.com>
Co-authored-by: Дмитрий Цветцих <dmitrycvet@gmail.com>
Co-authored-by: Richard Winters <rik@mmogp.com>
Co-authored-by: Mark Jeghers <jeghers@users.noreply.github.com>
Co-authored-by: Marcin Cieślak <saper@saper.info>
Co-authored-by: Dieter De Paepe <dieter.depaepe@gmail.com>
Co-authored-by: Operations Research Engineering Software+ <alex@oresoftware.com>
Co-authored-by: Flandre Scarlet <i@2333.moe>
Co-authored-by: peter--bolier--zero <bolier@xs4all.nl>
Co-authored-by: Nick Desaulniers <nickdesaulniers@users.noreply.github.com>
Co-authored-by: Nicola Del Gobbo <nicoladelgobbo@gmail.com>
Co-authored-by: Abdul Hameed <raza2022@gmail.com>
Co-authored-by: xdf <xudafeng@126.com>
Co-authored-by: Matt Hirsch <mhirsch@media.mit.edu>
Co-authored-by: João Reis <reis@janeasystems.com>
Co-authored-by: Bert Verhelst <verhelstbert@gmail.com>
Co-authored-by: Mayank <9084735+mayank99@users.noreply.github.com>
Co-authored-by: nineninesevenfour <75562299+nineninesevenfour@users.noreply.github.com>
Co-authored-by: Cheng Zhao <zcbenz@gmail.com>
Co-authored-by: Gar <gar+gh@danger.computer>
Co-authored-by: csett86 <csett86@web.de>
Co-authored-by: HeatonZ <905342035@qq.com>
Co-authored-by: Rich Trott <rtrott@gmail.com>
Co-authored-by: owl from hogvarts <47751812+owl-from-hogvarts@users.noreply.github.com>
Co-authored-by: nlf <quitlahok@gmail.com>
Co-authored-by: Mohamed-Elzohary <48733136+Mohamed-Elzohary@users.noreply.github.com>
Co-authored-by: alexcfyung <alexcfyung@hotmail.com>
Co-authored-by: Doni Rubiagatra <doni@zero-one-group.com>
Co-authored-by: Nick Wang <nickwang14@gmail.com>
Co-authored-by: Michael Dawson <mdawson@devrus.com>
Co-authored-by: hubbergit <y.ahi@tms-bonn.de>
Co-authored-by: Gaby Baghdadi <baghdadi@ca.ibm.com>
Co-authored-by: Mr. Doge <42662615+FuPeiJiang@users.noreply.github.com>
Co-authored-by: Kevin Adler <kadler@us.ibm.com>
Co-authored-by: TrellixVulnTeam <kasimir.schulz@trellix.com>
Co-authored-by: Luke Karrys <luke@lukekarrys.com>
Co-authored-by: Raymond Zhao <7199958+rzhao271@users.noreply.github.com>
Co-authored-by: Maksim Beliaev <beliaev.m.s@gmail.com>
Co-authored-by: ravindraP20 <72969399+ravindraP20@users.noreply.github.com>
Co-authored-by: Dennis Ameling <dennis@dennisameling.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
Co-authored-by: Stefan Stojanovic <StefanStojanovic@users.noreply.github.com>
Co-authored-by: James Cook <james@trainerroad.com>
Co-authored-by: Rareș <6453351+raress96@users.noreply.github.com>
Co-authored-by: Tim Perry <1526883+pimterry@users.noreply.github.com>
Co-authored-by: Iulian Onofrei <5748627+revolter@users.noreply.github.com>
Co-authored-by: Alex <aleksandrosansan@gmail.com>
Co-authored-by: Richard Lau <rlau@redhat.com>
Co-authored-by: Denis Bogomolov <denis@manwithbear.com>
@knackstedt
Copy link

knackstedt commented Mar 7, 2024

I'm also seeing this in my CI environment. I can positively confirm that all of my hosts can normally download this file, so whatever the download issue is it's local to node-gyp.

This comes through the node:20-alpine base image, and the error isn't really actionable so I'm not sure what else to try here.
The npm package that's being built with node-gyp is node-pty@0.10.1 FWIW. CICD environment is GoCD.

#14 183.8 npm ERR! code 1
#14 183.8 npm ERR! path /app/node_modules/node-pty
#14 183.8 npm ERR! command failed
#14 183.8 npm ERR! command sh -c node scripts/install.js
#14 183.8 npm ERR! gyp info it worked if it ends with ok
#14 183.8 npm ERR! gyp info using node-gyp@10.0.1
#14 183.8 npm ERR! gyp info using node@20.11.1 | linux | x64
#14 183.8 npm ERR! gyp info find Python using Python version 3.11.8 found at "/usr/bin/python3"
#14 183.8 npm ERR! gyp http GET https://unofficial-builds.nodejs.org/download/release/v20.11.1/node-v20.11.1-headers.tar.gz
#14 183.8 npm ERR! gyp WARN install got an error, rolling back install
#14 183.8 npm ERR! gyp ERR! configure error 
#14 183.8 npm ERR! gyp ERR! stack FetchError: request to https://unofficial-builds.nodejs.org/download/release/v20.11.1/node-v20.11.1-headers.tar.gz failed, reason: read ECONNRESET
#14 183.8 npm ERR! gyp ERR! stack at ClientRequest.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/minipass-fetch/lib/index.js:130:14)
#14 183.8 npm ERR! gyp ERR! stack at ClientRequest.emit (node:events:518:28)
#14 183.8 npm ERR! gyp ERR! stack at _destroy (node:_http_client:875:13)
#14 183.8 npm ERR! gyp ERR! stack at onSocketNT (node:_http_client:895:5)
#14 183.8 npm ERR! gyp ERR! stack at process.processTicksAndRejections (node:internal/process/task_queues:83:21)
#14 183.8 npm ERR! gyp ERR! System Linux 5.10.0-27-amd64
#14 183.8 npm ERR! gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
#14 183.8 npm ERR! gyp ERR! cwd /app/node_modules/node-pty
#14 183.8 npm ERR! gyp ERR! node -v v20.11.1
#14 183.8 npm ERR! gyp ERR! node-gyp -v v10.0.1
#14 183.8 npm ERR! gyp ERR! not ok
#14 183.8 
#14 183.8 npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2024-03-07T01_48_45_416Z-debug-0.log
#14 ERROR: process "/bin/sh -c npm i --omit=dev" did not complete successfully: exit code: 1

Update: Using the node:20-bullseye base image works, so there might be a missing dependency or something that's not present in MUSL that's ending up boiling that error out. If it's a missing dependency, I'd imagine node-gyp would have a basic package check it could do?

@cclauss cclauss reopened this Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants