Repository navigation
added devEngines support breaks updating dependencies #729
Description
Activity
- added 2 commits that reference this issue
on Jul 28, 2025 To clarify, Corepack does support ranges in
devEngines, but you must pin a specific version inpackageManagerfield@aduh95 yes I know - but I personally do not want to use Corepack.
it is used by services like Dependabot or Renovate which are used by many projects.So as soon as we use
devEngineswith a valid value (semantic version range) those services break because Corepack throws an exception.From my point of view Corepack should handle this more gracefully and just ignore it. Like it is already doing if you provide an array for the
packageManagerkey ofdevEngines(which is our current workaround for this regressions).Reacted by Paul, Ian Copp and Nathan Sarang-WaltersI get that, I wonder why those services do not define
COREPACK_ENABLE_STRICT=0in their env as I agree it doesn't make much sense for them to fail in this case. Regarding whether Corepack by default should not complain, I don't know, not pinning the version in dev is going against best practices, it sorta makes sense to nudge the users towards following best practices.- added a commit that references this issue
on Dec 6, 2025 - added 2 commits that reference this issue
on Apr 13, 2026 This is really annoying indeed. When upgrading to pnpm 11, I got rid of the
packageManagerfield at first, since pnpm marks it as "legacy" in their docs. But upon pushing to Netlify, that uses Corepack to select the correct pm and node version. So several tools support semver, since it's valid syntax, but only Corepack doesn't support it, ugh.PR #730 looks like that would fix the issue. Hopefully a maintainer can find the time to review that PR.
packageManagerisn't legacy nor deprecated.Corepack requires a specific version - see https://github.com/nodejs/corepack#devenginespackagemanager
If you take out the
^character, such as"devEngines": { "packageManager": { "name": "pnpm", "version": "11.0.1", "onFail": "download" } },
I would expect Corepack to work with pnpm
packageManagerisn't legacy nor deprecated.Hmm, maybe pnpm simply considers it as legacy for usage with pnpm then? https://pnpm.io/11.x/package_json#devenginespackagemanager
Corepack requires a specific version - see https://github.com/nodejs/corepack#devenginespackagemanager
If you take out the
^character, such as"devEngines": {
"packageManager": {
"name": "pnpm",
"version": "11.0.1",
"onFail": "download"
}
},
I would expect Corepack to work with pnpmIMO Corepack should adhere to how
devEngineswas meant. It supports semver, so should Corepack.Reacted by RaffaeleHmm, maybe pnpm simply considers it as legacy for usage with pnpm then?
That would be my understanding too.
IMO Corepack should adhere to how
devEngineswas meant. It supports semver, so should Corepack.devEngines was an evolving standard after Corepack was created. I wouldn't expect any major changes to Corepack now. You can read #687 for a discussion about the status and expectations for Corepack to become non-experimental through further development.
devEngines was an evolving standard after Corepack was created. I wouldn't expect any major changes to Corepack now.
That is fine, but then it should simply ignore this property if it cannot adapt.
Because otherwise it will force basically everyone to use the hacky workaround with using array-syntax.
(I doubt dependabot or renovate will implement a global workaround this bug so either corepack fixes it or we have to live with this workaround forever 😔 )Reacted by John Molakvoæ, Klaas van der Weij and RaffaeledevEngines was an evolving standard after Corepack was created. I wouldn't expect any major changes to Corepack now. You can read #687 for a discussion about the status and expectations for Corepack to become non-experimental through further development.
Ah I see, too bad development has stalled a bit. Thanks for your efforts to reboot it though! Should parties like Netlify still count on Corepack or look for (their own) alternatives?
I agree with @susnux, the workarounds suck and quite a bunch of tools and parties rely on Corepack now. Is there anything we can do to help get Corepack up to speed again @MikeMcC399?
Tagging @netlify as this is in their interest as well
Corepack is not enabled by default and if you are using it with
pnpm@11, then I suggest to follow the pnpm@11 documentation which advises:You can pin the version of pnpm used on your project using the following command:
corepack use pnpm@next-11This will add a "packageManager" field in your local package.json which will instruct Corepack to always use a specific version on that project. This can be useful if you want reproducability, as all developers who are using Corepack will use the same version as you. When a new version of pnpm is released, you can re-run the above command.
pnpm does not depend on Corepack and offers several different ways to install it.
It's not about my local development env, it's about Netlify using
corepackto use the correct package manager. I ended up quickfixing my particular case by setting a pinned version indevEngines.packageManagerinstead of a semver range and that's something I can live with, even though it'd nice to be able to say "this package's dependencies should be managed by with versions " and have corepack respect that, but I understand the difficulties at hand.- added a commit that references this issue
on Jun 14, 2026 Any chances of moving this forward? As you can see from PRs referencing this thread, many projects are being forced to ditch
devEngines.packageManagereven if it fits their needs and was setup correctly, just because otherwise they cannot use dependabot.I understand corepack may or may not be interested in investing in
devEngines.packageManager, but if supporting the full spec is not acceptable, at least it should allow to opt-out or ignore the field entirely. Right now corepack is positioned as an obstacle for anyone interested in adoptingdevEnginesfor what (I presume) is just a minor bug, which is a shame. I see someone attempted a fix (#730), could this be a way forward?Reacted by Will Slattum, Matt Mower, Marcello, Florian Gäbler and Nathan Sarang-Walters
The recent
devEnginessupport seems to cause errors with dependabot (all updates broken), this is an example but there are more packages like this:Context:
Within our project we have this in the
package.json:(We support a wide range of engines - but for development devs should only use Node 22 and NPM 10 to have consistent compiled assets (and test results)).
I guess this is caused here: https://github.com/nodejs/corepack/pull/643/files#r2234021913
I see two ways to fix corepack:
Details
devEnginesif it is a version range, see patch:Details