Skip to content

Contradictory logs. wrong logs of node version. #5926

Closed
@Abhishek-kumar-samsung

Description

@Abhishek-kumar-samsung

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Awaiting Informationfurther information is requestedBugthing that needs fixingNeeds Triageneeds review for next stepsRelease 9.xwork is associated with a specific npm 9 release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions