denoland / deno

A modern runtime for JavaScript and TypeScript.
https://deno.com
MIT License
97.08k stars 5.36k forks source link

specs::npm::lifecycle_scripts::node_gyp is flaky #24749

Open dsherret opened 3 months ago

dsherret commented 3 months ago

It seems to rely on https://nodejs.org/download/release/v20.11.1/node-v20.11.1-headers.tar.gz. Any way we could change that to use the test server instead?

gyp info it worked if it ends with ok
gyp info using node-gyp@10.1.0
gyp info using node@20.11.1 | linux | x64
gyp info find Python using Python version 3.11.9 found at "/opt/hostedtoolcache/Python/3.11.9/x64/bin/python3"

gyp http GET https://nodejs.org/download/release/v20.11.1/node-v20.11.1-headers.tar.gz
gyp http 200 https://nodejs.org/download/release/v20.11.1/node-v20.11.1-headers.tar.gz
gyp ERR! UNCAUGHT EXCEPTION 
gyp ERR! stack TypeError: error reading a body from connection
gyp ERR! stack at IncomingMessageForClient._read (node:http:781:10)
gyp ERR! stack at IncomingMessageForClient.Readable.read (ext:deno_node/_stream.mjs:2996:16)
gyp ERR! stack at maybeReadMore_ (ext:deno_node/_stream.mjs:3092:16)
gyp ERR! stack at processTicksAndRejections (ext:deno_node/_next_tick.ts:33:15)
gyp ERR! stack at runNextTicks (ext:deno_node/_next_tick.ts:71:3)
gyp ERR! stack at eventLoopTick (ext:core/01_core.js:175:21)
gyp ERR! System Linux 6.5.0-1024-azure
gyp ERR! command "node-gyp" "/tmp/deno-cli-test5eJ8A8/node_modules/.deno/node-gyp@10.1.0/node_modules/node-gyp/bin/node-gyp.js" "configure" "build"
gyp ERR! cwd /tmp/deno-cli-test5eJ8A8/node_modules/.deno/@denotest+node-addon@1.0.0/node_modules/@denotest/node-addon
gyp ERR! node -v v20.11.1
gyp ERR! node-gyp -v v10.1.0
gyp ERR! Node-gyp failed to build your package.
gyp ERR! Try to update npm and/or node-gyp and if it does not help file an issue with the package author.
error: script 'install' in '@denotest/node-addon@1.0.0' failed with exit code 7
vighnesh153 commented 2 months ago

Not sure if it is related, but I get similar error message when I try to run deployctl.

➜  deno-api-proxy git:(main) ✗ deno task deploy:dev
Task deploy:dev deployctl deploy --project=deno-api-proxy-dev
ℹ Using config file '/path/to/deno.json'
✔ Deploying to project my-project-name.
✔ Entrypoint: /path/to/main.ts
ℹ Uploading all files from the current dir (/path/to/currentDirectory)
✔ Found 2 assets.
✔ Uploaded 2 new assets.
⠼ Deploying... (100.0%)
⠦ Deploying... (100.0%)
error: TypeError: error reading a body from connection

My deploy:dev task just has the following:

deployctl deploy --project=dev-project

Re-running the command worked through.

dsherret commented 2 months ago

Still flaky: https://github.com/denoland/deno/actions/runs/10355229341/job/28662377067