Skip to content

Invalid package manager specification in package.json (pnpm@^11.0.0); expected a semver version #11388

@Armadillidiid

Description

@Armadillidiid

Verify latest release

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

pnpm version

v11.0.0

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

  1. Create a new project with pnpm init and cd into it.
  2. Try to call any CLI commands

Describe the Bug

pnpm@11 introduces devEngines.packageManager as the new way to pin the package manager version. However, when migrating an existing project or creating a new one using this field, Corepack fails with an error, suggesting it does not yet support devEngines.packageManager.

If I include both fields in package.json:

{
  "packageManager": "pnpm@11.0.0",
  "devEngines": {
    "packageManager": {
      "name": "pnpm",
      "version": "^11.0.0",
      "onFail": "download"
    }
  },
}

pnpm emits the following warning:

WARN  Cannot use both "packageManager" and "devEngines.packageManager" in package.json. "packageManager" will be ignored

This creates a conflict:

  • Corepack requires packageManager
  • pnpm v11 recommends devEngines.packageManager

Expected Behavior

Corepack should recognize and respect devEngines.packageManager, or pnpm should provide a compatibility path that doesn’t produce conflicting signals between the two fields.

Which Node.js version are you using?

v24.15.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)

Arch Linux

Metadata

Metadata

Assignees

Labels

Type

No fields configured for Bug.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions