Skip to content

ERR_PNPM_BAD_PM_VERSION error message clarity #158

Open
@MarcoStrykerlabs

Description

@MarcoStrykerlabs

An error in our pnpm/action-setup config by declaring the version property as "pnpm@###" lead to following error message:

- version [email protected]+sha512.845196026aab1cc3f098a0474b64dfbab2afe7a1b4e91dd86895d8e4aa32a7a6d03049e2d0ad770bbe4de023a7122fb68c1a1d6e0d033c7076085f9d5d4800d4 in the GitHub Action config with the key "version"
- version [email protected]+sha512.845196026aab1cc3f098a0474b64dfbab2afe7a1b4e91dd86895d8e4aa32a7a6d03049e2d0ad770bbe4de023a7122fb68c1a1d6e0d033c7076085f9d5d4800d4 in the package.json with the key "packageManager"
  Remove one of these versions to avoid version mismatch errors like ERR_PNPM_BAD_PM_VERSION

While it is a configuration error, the error message looks misleading as the printed versions are the same and could be more clear by showing the exact comparison done in
/src/install-pnpm/run.ts:

throw new Error(`Multiple versions of pnpm specified:
  - version ${version} in the GitHub Action config with the key "version"
  - version ${packageManager.replace('pnpm@', '')} in the package.json with the key "packageManager"
Remove one of these versions to avoid version mismatch errors like ERR_PNPM_BAD_PM_VERSION`)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions