Contradictory logs. wrong logs of node version. #5926
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
Is there an existing issue for this?
This issue exists in the latest npm version
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
git clone https://github.com/npm/cli.git npm
Take node version as 18.12.1 and latest npm repository.
Environment
The text was updated successfully, but these errors were encountered: