-
-
Notifications
You must be signed in to change notification settings - Fork 936
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
Resolutions/overrides suddenly changed behavior #7184
Comments
This line was added:
Maybe it caused the issue? |
By the looks of this one, this might be the cause, If the options are only written on the sub-project manifest, and there are no options on the root manifest, all options will be overwritten with an empty object. Maybe we should take into consideration in here the value for shared-workspace-lockfile |
@SiNONiMiTY can you check if removing that line fixes your issue? |
I modified that line then recompiled, and tried to used the result, sadly the options are still removed. Reverted to the original files for 8.8.0 and it worked as expected again. Aside from this line, there might be other changes that triggered this issue. Looking at the changes from #7141 as the issue might have been introduced there. |
Some changes from #7141 were reverted, so the changes should be reviewed between 8.8.0 and 8.9.0 https://github.com/pnpm/pnpm/compare/v8.8.0...v8.9.0?diff=unified |
Last pnpm version that worked
8.8.0
pnpm version
8.9.0
Code to reproduce the issue
We recently migrated a Yarn project to pnpm successfully but since the latest pnpm update today, our CI installs started throwing the following error when running
pnpm i --prefer-offline --prod=false --frozen-lockfile
:If I remove
--frozen-lockfile
, pnpm installs but completely remove my overrides configuration.Our package.json contains the following
resolutions
field:Which generated in our lockfile:
If it helps: this repo is part of a monorepo that uses a
.npmrc
file withshared-workspace-lockfile=false
. If I extract the repo from the monorepo, installing with--frozen-lockfile
still works.Until v8.8.0 this configuration worked well inside or outside the monorepo, but now in v8.9.0 it's broken when inside.
I also tried to replace
"resolutions"
with"pnpm": { "overrides":
, but the same happens: works when alone, breaks inside monorepo.Expected behavior
A patch change (as described in the Release Notes) shouldn't break current workflows, so this a bug or a breaking change.
Expected behavior is that
pnpm i --prefer-offline --prod=false --frozen-lockfile
should just work as before, when inside a monorepo with a.npmrc
file withshared-workspace-lockfile=false
.Actual behavior
When using
resolutions
onpackage.json
,pnpm i --prefer-offline --prod=false --frozen-lockfile
doesn't work when inside a monorepo with a.npmrc
file withshared-workspace-lockfile=false
.Additional information
No response
Node.js version
18.16.1
Operating System
macOS
The text was updated successfully, but these errors were encountered: