Skip to content

Pnpm errors when run with compatible "engines.pnpm" field in package.json #7124

Description

@Siegrift

Verify latest release

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

pnpm version

8.7.6

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

CLI

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

No response

Reproduction steps

This is part of my package.json:

  "engines": {
    "node": "^18.14.0",
    "pnpm": "^8.7.6"
  }

When I run pnpm run dev I get:

 ERR_PNPM_UNSUPPORTED_ENGINE  Unsupported environment (bad pnpm and/or Node.js version)

Your pnpm version is incompatible with "<path-to-workspace>".

Expected version: ^8.7.6
Got: 8.7.5

This is happening because the package's manifest has an engines.pnpm field specified.
To fix this issue, install the required pnpm version globally.

To install the latest version of pnpm, run "pnpm i -g pnpm".
To check your pnpm version, run "pnpm -v".
 ELIFECYCLE  Command failed with exit code 1.

When I do pnpm -v I get:

8.7.6

Describe the Bug

It seems the patch version of the CLI is not updated?

Expected Behavior

The command should run without issues.

Which Node.js version are you using?

18.14.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

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions