Skip to content

Unable to Use PNPM - Invalid Node Version Error (ERR_PNPM_INVALID_NODE_VERSION) #9276

@brunomacedo

Description

@brunomacedo

Verify latest release

  • I verified that the issue exists in the latest pnpm release

pnpm version

10.6.2

Which area(s) of pnpm are affected? (leave empty if unsure)

No response

Link to the code that reproduces this issue or a replay of the bug

No response

Reproduction steps

  1. Install Node.js (latest version).
  2. Install CommandLine Tools for Mac.
  3. Install Homebrew.
  4. Install PNPM using Homebrew or any other method.
  5. Run the command:
    pnpm config set use-node-version 22.14
  6. After running the above command, all PNPM commands stop working.
  7. Clean all cache folders and verify environment variables.
  8. Even after uninstalling and reinstalling Node.js, CommandLine Tools, Homebrew, and PNPM, no PNPM commands work.

Describe the Bug

After running the command pnpm config set use-node-version 22.14, PNPM commands stopped working, and I started encountering the following error when running any PNPM command, such as pnpm --help:

 ERR_PNPM_INVALID_NODE_VERSION  "22.14" is not a valid Node.js version

This error indicates that the Node.js version being used is incorrectly recognized as "22.14", which is not a valid version. Despite uninstalling and reinstalling all related components, I still can't use PNPM because of this invalid version error.

Expected Behavior

PNPM should recognize the valid Node.js version and run the commands without any issues. I expect that when running pnpm --help, it should display the help information without errors related to an invalid Node version.

Which Node.js version are you using?

23.9.0

Which operating systems have you used?

  • macOS
  • Windows
  • Linux

If your OS is a Linux based, which one it is? (Include the version if relevant)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions