Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERR_PNPM_BAD_PM_VERSION error message clarity #158

Open
MarcoStrykerlabs opened this issue Feb 13, 2025 · 0 comments
Open

ERR_PNPM_BAD_PM_VERSION error message clarity #158

MarcoStrykerlabs opened this issue Feb 13, 2025 · 0 comments

Comments

@MarcoStrykerlabs
Copy link

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`)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant