setup-node
setup-node copied to clipboard
node-version: 'latest' taking 20+ minuites
Description:
Node setup taking forever (20m+) when using latest
Exmaple:
Code:
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 'latest'
Is the latest version not caches somewhere?
Action version: actions/setup-node@v3
Platform:
- [ ] Ubuntu
- [x] macOS
- [ ] Windows
Runner type:
- [x] Hosted
- [ ] Self-hosted
Example of this failing.
I'm getting it too. I'm use latest
as the node version and the Log is:
❯ gh run view 6558471842 --log-failed
test Node setup 2023-10-18T08:48:29.8829257Z ##[group]Run actions/setup-node@v3
test Node setup 2023-10-18T08:48:29.8829747Z with:
test Node setup 2023-10-18T08:48:29.8830054Z node-version: latest
test Node setup 2023-10-18T08:48:29.8830412Z always-auth: false
test Node setup 2023-10-18T08:48:29.8830776Z check-latest: false
test Node setup 2023-10-18T08:48:29.8831318Z token: ***
test Node setup 2023-10-18T08:48:29.8831613Z ##[endgroup]
test Node setup 2023-10-18T08:48:30.3387908Z getting latest node version...
test Node setup 2023-10-18T08:48:30.3411536Z getting latest node version...
test Node setup 2023-10-18T08:48:30.3413660Z Attempting to download v21.0.0...
test Node setup 2023-10-18T08:48:30.6240758Z Not found in manifest. Falling back to download directly from Node
test Node setup 2023-10-18T08:48:30.6557915Z Acquiring 21.0.0 - x64 from https://nodejs.org/dist/v21.0.0/node-v21.0.0-linux-x64.tar.gz
test Node setup 2023-10-18T08:53:10.8209480Z aborted
test Node setup 2023-10-18T08:53:10.8209977Z Waiting 14 seconds before trying again
test Node setup 2023-10-18T09:02:35.6053574Z aborted
test Node setup 2023-10-18T09:02:35.6054014Z Waiting 16 seconds before trying again
test Node setup 2023-10-18T09:05:51.9376210Z ##[error]aborted
The same problem occurs when version 19.8.1
is specified.
At least as of two days ago I had the same problem.
runs-on: ubuntu-latest
steps:
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: 19.8.1
I can get the tar.gz file correctly with curl, so I wonder if there is a problem with the cache handling in the @actions/tool-cache library?
Same issue here using
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '17.6.0'
The download speeds from nodejs.org do seem incredibly slow when manually downloading.
Same with node-version: '19'
We are also seeing this issue. Anytime we try and install node v18, if Node's downloads are slow that day it always fails. We didn't have this issue on earlier node versions.
Hello @andyslack Thank you for submitting this issue. We will investigate and come back to you as soon as possible 🚀
@marko-zivic-93 let me know if there is anything I can do to help!
Same problem here too.
jobs:
test_frontend:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 19.x
- name: Build
run: |
yarn install
- name: Test
run: |
npm test
I'm getting the same issue with 19.1 since yesterday
Same with node 21
. The install or post-install steps fail almost every run
Any update on this?
Builds are failing for us as well. Downloads taking upwards of 7 hours.
This is happening for us as well, using latest
.
[edit]
Using v4
of the action resolved this issue for us. v4
was released 4 days ago, and I was unaware of the update.
Had the same problem with v3, but it only happens intermittently. Tried v4 out, same problem.
I found some information that might help others. If you can upgrade your version of node to an LTS version found in the manifest , I believe the builds will use the cached version from actions/node-versions
and skip the download step. This link has more information, specifically this part:
"current/latest/node always resolve to the latest dist version. That version is then downloaded from actions/node-versions if possible, or directly from Node.js if not. Since it will not be cached always, there is possibility of hitting rate limit when downloading from dist"
@bonniegrubbs I think you are correct here.
Might be a good idea to add options to the manifest for latest-cached
and also root versions e.g. 18
19
rather than having to specify 18.18.2
Just an idea to make it more user friendly.
Seeing this, too, with pinned versions of node. Sometimes the download fails and the ci failed. Is there some way to add more verbosity to try and see whats breaking down? Also, would it make sense to add a retry mechanism? Things generally work after re-running the workflow, so if we can just automate that it would allow ci to pass.
What I'm seeing with setup-node@v4
is whether I use 'latest'
or '>=21.2', for example, the "best" I get is v18.19.1
while the actual latest is v21.7.0
right now.
strategy:
matrix:
node-version: ['>=21.2']
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node ${{ matrix.node }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
check-latest: true
cache: npm