CircleCI-Public / node-orb

An orb for working with Node.js on CircleCI
https://circleci.com/orbs/registry/orb/circleci/node
MIT License
52 stars 80 forks source link

Node fails to download #196

Closed MarcinVaadin closed 12 months ago

MarcinVaadin commented 12 months ago

Orb version:

5.1.0

What happened:

Fails to install node:

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 15916  100 15916    0     0   219k      0 --:--:-- --:--:-- --:--:--  222k
=> Downloading nvm from git to '/home/circleci/.nvm'
=> Cloning into '/home/circleci/.nvm'...
remote: Enumerating objects: 360, done.        
remote: Counting objects: 100% (360/360), done.        
remote: Compressing objects: 100% (306/306), done.        
remote: Total 360 (delta 41), reused 165 (delta 28), pack-reused 0        
Receiving objects: 100% (360/360), 220.29 KiB | 18.36 MiB/s, done.
Resolving deltas: 100% (41/41), done.
* (HEAD detached at FETCH_HEAD)
  master
=> Compressing and cleaning up git repository

=> Appending nvm source string to /home/circleci/.profile
=> bash_completion source string already in /home/circleci/.profile
=> Close and reopen your terminal to start using nvm or run the following to use it now:

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
Downloading and installing node v18.18.0...
Downloading https://nodejs.org/dist/v18.18.0/node-v18.18.0-linux-x64.tar.xz...
####                                                                       6.0%curl: (92) HTTP/2 stream 0 was not closed cleanly: INTERNAL_ERROR (err 2)

Binary download from https://nodejs.org/dist/v18.18.0/node-v18.18.0-linux-x64.tar.xz failed, trying source.
grep: /home/circleci/.nvm/.cache/bin/node-v18.18.0-linux-x64/node-v18.18.0-linux-x64.tar.xz: No such file or directory
Provided file to checksum does not exist.
Binary download failed, trying source.
Detected that you have 36 CPU core(s)
Running with 35 threads to speed up the build
Downloading https://nodejs.org/dist/v18.18.0/node-v18.18.0.tar.xz...
#                                                                          1.8%curl: (92) HTTP/2 stream 0 was not closed cleanly: INTERNAL_ERROR (err 2)

Binary download from https://nodejs.org/dist/v18.18.0/node-v18.18.0.tar.xz failed, trying source.
grep: /home/circleci/.nvm/.cache/src/node-v18.18.0/node-v18.18.0.tar.xz: No such file or directory
Provided file to checksum does not exist.

Exited with code exit status 1

Expected behavior:

Should install. Maybe cache or proxy.

Additional Information:

Nothing to add

blimmer commented 12 months ago

This is a persistent issue upstream with the Node mirror: https://github.com/nodejs/nodejs.org/issues/5149

We've done two things where possible:

  1. Move from machine executors to docker images with the proper node version pre-installed.
  2. Cache the NVM install (e.g., via https://benlimmer.com/2023/09/18/circleci-cache-nvm/)

There's not much this orb can do about flakiness upstream, unless the orb wants to implement relies/caching.

MarcinVaadin commented 12 months ago

Nothing to be done as answered above.