Skip to content
New issue

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

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

Already on GitHub? # to your account

[BUG] npm upgrade EBADENGINE #7989

Closed
2 tasks done
virajkanwade opened this issue Dec 17, 2024 · 2 comments
Closed
2 tasks done

[BUG] npm upgrade EBADENGINE #7989

virajkanwade opened this issue Dec 17, 2024 · 2 comments
Labels
Bug thing that needs fixing Needs Triage needs review for next steps

Comments

@virajkanwade
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

This issue exists in the latest npm version

  • I am using the latest npm

Current Behavior

Running npm install -g npm inside node:20.12.2-alpine3.19 docker container.

/code # npm install -g npm
npm ERR! code EBADENGINE
npm ERR! engine Unsupported engine
npm ERR! engine Not compatible with your version of node/npm: npm@11.0.0
npm ERR! notsup Not compatible with your version of node/npm: npm@11.0.0
npm ERR! notsup Required: {"node":"^20.17.0 || >=22.9.0"}
npm ERR! notsup Actual:   {"npm":"10.5.0","node":"v20.12.2"}

npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2024-12-17T15_14_02_415Z-debug-0.log

The package page https://www.npmjs.com/package/npm says following node versions should work

18.x.x >= 18.17.0
20.5.0 or higher

Tried it on node:20.17.0-alpine3.19 docker container and it worked.

Expected Behavior

As per the package page, npm 11.0.0 should install on node 20.12.2

Steps To Reproduce

Running npm install -g npm inside node:20.12.2-alpine3.19 docker container.

/code # npm install -g npm
npm ERR! code EBADENGINE
npm ERR! engine Unsupported engine
npm ERR! engine Not compatible with your version of node/npm: npm@11.0.0
npm ERR! notsup Not compatible with your version of node/npm: npm@11.0.0
npm ERR! notsup Required: {"node":"^20.17.0 || >=22.9.0"}
npm ERR! notsup Actual:   {"npm":"10.5.0","node":"v20.12.2"}

npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2024-12-17T15_14_02_415Z-debug-0.log

Environment

  • npm: 11.0.0
  • Node.js: 20.12.2
  • OS Name: Docker alpine
  • System Model Name:
  • npm config:
; copy and paste output from `npm config ls` here
@virajkanwade virajkanwade added Bug thing that needs fixing Needs Triage needs review for next steps labels Dec 17, 2024
@virajkanwade
Copy link
Author

npm install -g npm@10.9.2 works on node:20.12.2-alpine3.19

@milaninfy
Copy link
Contributor

npm 11 needs node ^20.17.0 || >=22.9.0

npm now supports node ^20.17.0 || >=22.9.0

https://github.com/npm/cli/blob/latest/CHANGELOG.md#1100-pre0-2024-11-26

Regarding documentation bug we already have similer issue #7984

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Bug thing that needs fixing Needs Triage needs review for next steps
Projects
None yet
Development

No branches or pull requests

2 participants