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

Contradictory logs. wrong logs of node version. #5926

Closed
2 tasks done
Abhishek-kumar-samsung opened this issue Dec 7, 2022 · 3 comments
Closed
2 tasks done

Contradictory logs. wrong logs of node version. #5926

Abhishek-kumar-samsung opened this issue Dec 7, 2022 · 3 comments
Labels
Awaiting Information further information is requested Bug thing that needs fixing Needs Triage needs review for next steps Release 9.x work is associated with a specific npm 9 release

Comments

@Abhishek-kumar-samsung
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

I tried to install npm cli using its github repository in the way told in [https://github.com/npm/cli/blob/latest/CONTRIBUTING.md]

when i try node . install , then i am getting this log.

ERROR: npm v9.1.3 is known not to run on Node.js v18.12.1. You'll need to upgrade to a newer Node.js version in order to use this version of npm. This version of npm supports the following node versions: `^14.17.0 || ^16.13.0 || >=18.0.0`. You can find the latest version at https://nodejs.org/.

This clearly is a logging error, because the logs are itself very contradictory, on one hand it says npm v9.1.3 will not run on node version 18.12.1. And on the other hand it says this npm supports node versions>=18.0.0.
So it is a logging bug, hardcoded node version written in package.json that is used for logging is wrong.

Expected Behavior

As per expected behaviour, either it should accept the node version to install npm, since package.json says that npm will work for node version>=18.0.0
Or if that not happens then the logging should not say that it supports node version>=18.0.0

Steps To Reproduce

  1. clone the npm cli repository git clone https://github.com/npm/cli.git npm
  2. cd npm
  3. node . install

Take node version as 18.12.1 and latest npm repository.

Environment

  • npm: v9.1.3
  • Node.js: v18.12.1
@Abhishek-kumar-samsung Abhishek-kumar-samsung added Bug thing that needs fixing Needs Triage needs review for next steps Release 9.x work is associated with a specific npm 9 release labels Dec 7, 2022
@Abhishek-kumar-samsung
Copy link
Author

can you assign this issue to me?

@fritzy
Copy link
Contributor

fritzy commented Dec 7, 2022

Please include the full log. Which OS? Unable to reproduce, so please re-open when you have the logs and OS.

@fritzy fritzy closed this as completed Dec 7, 2022
@fritzy fritzy added the Awaiting Information further information is requested label Dec 7, 2022
@Abhishek-kumar-samsung
Copy link
Author

Abhishek-kumar-samsung commented Dec 7, 2022

I was trying on windows.
@fritzy did you checked node version. This issue not coming always.

I am using latest node version i.e 18.12.1 and latest npm cli repository.

For that it should reproduce.

You must have a different node version. Try putting node version greater than 18.0.0. To be specific 18.12.1 because for me it came in that and the issue will come.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Information further information is requested Bug thing that needs fixing Needs Triage needs review for next steps Release 9.x work is associated with a specific npm 9 release
Projects
None yet
Development

No branches or pull requests

2 participants