Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot install packages using Node.js 22 on windows-latest runners #1025

Closed
2 of 5 tasks
lpsinger opened this issue Apr 29, 2024 · 6 comments
Closed
2 of 5 tasks

Cannot install packages using Node.js 22 on windows-latest runners #1025

lpsinger opened this issue Apr 29, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@lpsinger
Copy link

Description:
If you set node-version to 22 on a GitHub-hosted windows-latest runner, commands like npm ci fail with the following error message:

node:internal/modules/cjs/loader:1205
  throw err;
  ^
Error: Cannot find module 'C:\npm\prefix\node_modules\npm\bin\npm-cli.js'
    at Module._resolveFilename (node:internal/modules/cjs/loader:1202:15)
    at Module._load (node:internal/modules/cjs/loader:1027:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:187:14)
    at node:internal/main/run_main_module:28:49 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}
Node.js v22.0.0

Action version:
v4

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Tools version:
node: v22.0.0
npm: 10.5.1
yarn: 1.22.22

Repro steps:
See https://github.com/lpsinger/nodejs-22-windows

Expected behavior:
Build should pass

Actual behavior:
Build fails. See this workflow run: https://github.com/lpsinger/nodejs-22-windows/actions/runs/8881922941/job/24385408488

@lpsinger lpsinger added bug Something isn't working needs triage labels Apr 29, 2024
lpsinger added a commit to lpsinger/gcn.nasa.gov that referenced this issue Apr 29, 2024
lpsinger added a commit to lpsinger/gcn.nasa.gov that referenced this issue Apr 29, 2024
lpsinger added a commit to lpsinger/gcn.nasa.gov that referenced this issue Apr 29, 2024
lpsinger added a commit to nasa-gcn/gcn.nasa.gov that referenced this issue Apr 29, 2024
@aparnajyothi-y
Copy link
Contributor

Hello @lpsinger, Thank you for creating this issue and we will look into it :)

@nfriedly
Copy link

nfriedly commented Apr 30, 2024

I believe I'm having the same issue here: https://github.com/express-rate-limit/express-rate-limit/actions/runs/8900764596/job/24445327662 - that commit was a documentation-only change and the previous build passed.

It runs on nodejs 16 + the latest LTS (currently 20) + the latest release (currently 22). This failure happened with node.js v22.0.0 & npm 10.5.1.

@Inrixia
Copy link

Inrixia commented May 1, 2024

I'm having the same issue, any ideas on a eta to fix this will block all my windows builds that need to use node 22

nfriedly referenced this issue in express-rate-limit/express-rate-limit May 1, 2024
@wolfy1339
Copy link

This is a problem with Node itself nodejs/node#52682

@nfriedly
Copy link

nfriedly commented May 6, 2024

Looks like this is now fixed with node.js 22.1.0 and npm 10.7.0 - https://github.com/express-rate-limit/express-rate-limit/actions/runs/8900764596

@lpsinger
Copy link
Author

lpsinger commented May 6, 2024

Yes, indeed. Thanks!

@lpsinger lpsinger closed this as completed May 6, 2024
lpsinger added a commit to lpsinger/gcn.nasa.gov that referenced this issue May 6, 2024
Inrixia added a commit to Inrixia/Floatplane-Downloader that referenced this issue May 16, 2024
@gowridurgad gowridurgad self-assigned this May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants