Node not downloading in pages builds

For the past couple of days many deployments get stuck in the "Downloading node" stage.
16:02:16.380 Success: Finished cloning repository files
16:02:17.001 Installing dependencies
16:02:17.009 Python version set to 2.7
16:02:19.246 Attempting node version '17' from .nvmrc
16:02:20.315 Downloading and installing node v17.9.1...
16:02:20.597 Downloading https://nodejs.org/dist/v17.9.1/node-v17.9.1-linux-x64.tar.xz...
16:06:28.478 curl: (18) transfer closed with 20615880 bytes remaining to read
16:02:16.380 Success: Finished cloning repository files
16:02:17.001 Installing dependencies
16:02:17.009 Python version set to 2.7
16:02:19.246 Attempting node version '17' from .nvmrc
16:02:20.315 Downloading and installing node v17.9.1...
16:02:20.597 Downloading https://nodejs.org/dist/v17.9.1/node-v17.9.1-linux-x64.tar.xz...
16:06:28.478 curl: (18) transfer closed with 20615880 bytes remaining to read
Anything I can do to remedy this?
22 Replies
Mic
Mic2y ago
I'm getting this exact same issue, getting stuck at downloading node. I haven't managed to get a single deploy (have tried 6 times) in the last 30 minutes
Cyb3r-Jak3
Cyb3r-Jak32y ago
On build image v2 correct?
Charles-Axel
Charles-AxelOP2y ago
On both build v1 and v2
Cyb3r-Jak3
Cyb3r-Jak32y ago
Hmmm this was happening yesterday as well. @walshydev @johndotawesome
Chaika
Chaika2y ago
(If it helps/you want a quick fix, I believe if you use the latest major for each version in v2 its preinstalled https://discord.com/channels/595317990191398933/1020053805263507577/1116491058872864818. If you don't specify in v2, it defaults to 18, it looks like the nodejs download server is just choking, that download is super slow for me locally as well)
Walshy
Walshy2y ago
Node pls
Charles-Axel
Charles-AxelOP2y ago
But if I change the nvmrc to 18, the v1 image won't work anymore. Is there a way to keep 17 on the v1 image and 18 on the v2? (I have about 50 pages projects that depend on the same code, and don't want to manually change everything right now)
Walshy
Walshy2y ago
It will work But v1 or v2, either way we download from Node's site I think v2 has some pre installed like Chaika said which will help Looks like our preinstalled versions are 20.1.0, 18.16.0, 16.20.0, 14.21.3 and 12.22.12
Charles-Axel
Charles-AxelOP2y ago
👍 I will change to 18 and see if it runs correctly on the v1 image
Walshy
Walshy2y ago
Again, it'll still try and download form Node's site I don't expect anything better. Using one of the preinstalled versions is best (but checking with the team)
Charles-Axel
Charles-AxelOP2y ago
The node 18 deploy went perfectly!
itsmatteomanf
itsmatteomanf2y ago
I'm still getting this, btw. It has happened already last week, v2 image, but it's more generalized. And now it works again.
Cyb3r-Jak3
Cyb3r-Jak32y ago
RIP nodejs servers
Chaika
Chaika2y ago
don't forget, there is no nodejs "servers", there is just a single nodejs "server" that wouldn't survive without cache, more details https://nodejs.org/en/blog/announcements/node-js-march-17-incident Fun things, not to derail this too much. Guessing a combination of the preinstalled versions + nodejs 18/higher versions being more popular and thus being in cache for them helps things
Cyb3r-Jak3
Cyb3r-Jak32y ago
Yeah if it was a single server it would have died a while ago. They should switch to using R2 or something to happen download
Chaika
Chaika2y ago
it's a single origin server (https://discord.com/channels/595317990191398933/812577823599755274/1097963106942058627), but yea protected/cached by CF
Cyb3r-Jak3
Cyb3r-Jak32y ago
Oh I forgot about that
itsmatteomanf
itsmatteomanf2y ago
I'd personally move the actual Node.js files to a subdomain on R2 NotLikeThis
Cyb3r-Jak3
Cyb3r-Jak32y ago
I already have a worker that caches stuff like maven and python downloads. Time to add nodejs to it But this is now #off-topic
JohnDotAwesome
Apologies about this, y'all! We do have pre-installed major versions of node from 12 through 20, but since our tools detected patch version updates to node 18, it tried to install those (instead of using the slightly older pre-installed version). This is getting fixed very soon. I'd also like to obviate the need to go upstream for any of these versions, but that will be in the 👋 future 👋
sleepykev.
sleepykev.16mo ago
I also had a similar issue with node 17 and although it took ~9 minutes to download, it did eventually work on a nextjs project. A manual download using the link printed was < 5 seconds for me (~42mb)
20:51:53.099 Success: Finished cloning repository files
20:51:54.712 Detected the following tools from environment: [email protected], [email protected]
20:51:54.712 Installing nodejs 17.3.0
20:52:01.880 Trying to update node-build... ok
20:52:02.549 Downloading node-v17.3.0-linux-x64.tar.gz...
20:52:02.549 -> https://nodejs.org/dist/v17.3.0/node-v17.3.0-linux-x64.tar.gz
21:01:00.541
21:01:00.542 WARNING: node-v17.3.0-linux-x64 is in LTS Maintenance mode and nearing its end of life.
21:01:00.542 It only receives *critical* security updates, *critical* bug fixes and documentation updates.
21:01:00.542
21:01:00.542 Installing node-v17.3.0-linux-x64...
21:01:02.111 Installed node-v17.3.0-linux-x64 to /opt/buildhome/.asdf/installs/nodejs/17.3.0
21:01:02.112
21:01:04.054 Preparing [email protected] for immediate activation...
21:01:05.332 Installing project dependencies: pnpm install
21:01:06.404 Lockfile is up to date, resolution step is skipped
21:01:06.445 Progress: resolved 1, reused 0, downloaded 0, added 0
21:01:06.562 Packages: +517
20:51:53.099 Success: Finished cloning repository files
20:51:54.712 Detected the following tools from environment: [email protected], [email protected]
20:51:54.712 Installing nodejs 17.3.0
20:52:01.880 Trying to update node-build... ok
20:52:02.549 Downloading node-v17.3.0-linux-x64.tar.gz...
20:52:02.549 -> https://nodejs.org/dist/v17.3.0/node-v17.3.0-linux-x64.tar.gz
21:01:00.541
21:01:00.542 WARNING: node-v17.3.0-linux-x64 is in LTS Maintenance mode and nearing its end of life.
21:01:00.542 It only receives *critical* security updates, *critical* bug fixes and documentation updates.
21:01:00.542
21:01:00.542 Installing node-v17.3.0-linux-x64...
21:01:02.111 Installed node-v17.3.0-linux-x64 to /opt/buildhome/.asdf/installs/nodejs/17.3.0
21:01:02.112
21:01:04.054 Preparing [email protected] for immediate activation...
21:01:05.332 Installing project dependencies: pnpm install
21:01:06.404 Lockfile is up to date, resolution step is skipped
21:01:06.445 Progress: resolved 1, reused 0, downloaded 0, added 0
21:01:06.562 Packages: +517
Looking at the other comments, perhaps I should try moving to node 18 or above.
JohnDotAwesome
JohnDotAwesome16mo ago
In v2, setting to major versions 12-20 should use a pre-installed version (no downloading necessary)
Want results from more Discord servers?
Add your server