-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
Last pnpm version that worked
8
pnpm version
9
Code to reproduce the issue
pnpm install with packageManager set to a different minor or patch version than you have installed
Expected behavior
I would expect to use the engines field to manage restrictions on what versions of package managers.
The packageManager field is used by platforms like Vercel and Netlify to choose what exact version of pnpm to use to run your project, which has been helpful for ensuring they're using a compatible major version.
However, I do not want to have to sync all of my various projects and locally installed version to always be using the same exact version of pnpm - especially with how frequently pnpm updates are released. Now I will have to constantly be updating the packageManager field in all my projects to match whatever the latest pnpm version is causing needless churn and a ton of annoying work that provides close to zero value. If I wanted to do that I already had the ability via engines.
Other users have been frustrated by this new enforcement as well. E.g. see #7956 (comment)
Actual behavior
ERR_PNPM_BAD_PM_VERSION This project is configured to use v9.1.1 of pnpm. Your current pnpm is v9.1.0
Additional information
Support for semver ranges is the number two issue in corepack nodejs/corepack#95. Setting package-manager-strict could make more sense after that is available. Though it would still seem to unnecessarily duplicate the engines field, so even then it wouldn't be my preference
Node.js version
20.10.0
Operating System
Linux