Skip to content

Subsequent calls do not change the node.js versions / node.js version does not update #885

Closed
@balupton

Description

@balupton

Description:
Subsequent calls to setup-node with different versions fails to install the latter version.

Action version:
v2 and v4 are affected

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Tools version:
n/a

Repro steps:
A description with steps to reproduce the issue. If you have a public example or repo to share, please provide the link.

Expected behavior:
for the second call below to return node 18

Actual behavior:
https://github.com/bevry/memo/actions/runs/6730893256/job/18294475193

5s
Run actions/setup-node@v4
  with:
    node-version: 20
    always-auth: false
    check-latest: false
    token: ***
Found in cache @ /opt/hostedtoolcache/node/20.9.0/x64
Environment details
  node: v20.9.0
  npm: 10.1.0
  yarn: 1.22.19
0s
Run printf '%s' 'node: ' && node --version && printf '%s' 'npm: ' && npm --version && node -e 'console.log(process.versions)'
node: v20.9.0
npm: 10.1.0
{
  node: '20.9.0',
  acorn: '8.10.0',
  ada: '2.6.0',
  ares: '1.19.1',
  base64: '0.5.0',
  brotli: '1.0.9',
  cjs_module_lexer: '1.2.2',
  cldr: '43.1',
  icu: '73.2',
  llhttp: '8.1.1',
  modules: '115',
  napi: '9',
  nghttp2: '1.57.0',
  nghttp3: '0.7.0',
  ngtcp2: '0.8.1',
  openssl: '3.0.10+quic',
  simdutf: '3.2.17',
  tz: '2023c',
  undici: '5.26.3',
  unicode: '15.0',
  uv: '1.46.0',
  uvwasi: '0.0.18',
  v8: '11.3.244.8-node.16',
  zlib: '1.2.13.1-motley'
}
0s
Run actions/setup-node@v4
  with:
    always-auth: false
    check-latest: false
    token: ***
Environment details
  node: v20.9.0
  npm: 10.1.0
  yarn: 1.22.19
0s
Run printf '%s' 'node: ' && node --version && printf '%s' 'npm: ' && npm --version && node -e 'console.log(process.versions)'
node: v20.9.0
npm: 10.1.0
{
  node: '20.9.0',
  acorn: '8.10.0',
  ada: '2.6.0',
  ares: '1.19.1',
  base64: '0.5.0',
  brotli: '1.0.9',
  cjs_module_lexer: '1.2.2',
  cldr: '43.1',
  icu: '73.2',
  llhttp: '8.1.1',
  modules: '115',
  napi: '9',
  nghttp2: '1.57.0',
  nghttp3: '0.7.0',
  ngtcp2: '0.8.1',
  openssl: '3.0.10+quic',
  simdutf: '3.2.17',
  tz: '2023c',
  undici: '5.26.3',
  unicode: '15.0',
  uv: '1.46.0',
  uvwasi: '0.0.18',
  v8: '11.3.244.8-node.16',
  zlib: '1.2.13.1-motley'
}

this is was due to user error, I had actionsNodeVersions in the matrix but was doing matrix.node:

https://github.com/bevry/memo/blob/9e21dec5ad58439564cad97842cbc25da663a6b7/.github/workflows/bevry.yml#L13C9-L13C28

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions