berry
berry copied to clipboard
[Bug] Automerge confused by change of checksums between yarn versions
- [ ] I'd be willing to implement a fix
Describe the bug
Going from [email protected] to installing from sources changes the checksums (and cacheKey
). If later getting a merge conflict with the previous version yarn automatically resolves the conflicts, but ends up erroring during install with YN0018
(The remote archive doesn't match the expected checksum
)
To Reproduce
https://github.com/SimenB/yarn-merge-error
What I've done is yarn init -2 && yarn set version berry
. I then installed a couple of dependencies and did some lockfile shenanigans to get a bit older versions than latest installed. I then created a new branch (sources
) and ran yarn set version from sources && yarn
there, commiting the result. Then back on main
I did rm yarn.lock && yarn
to get a fresh lockfile and commit that. The moving back to sources
I rebase on main
getting conflicts in the lockfile. Finally, running yarn
to automatically resolve the conflicts. This works, but ends up with YN0018
errors.
Screenshots
N/A
Environment if relevant (please complete the following information):
- OS: macOS
- Node version 14.15.3
- Yarn version
2.4.1
and2.4.0-git.20210308.hash-53e33b45
Additional context
N/A
For me
@types/react@npm:17.0.0: The remote archive doesn't match the expected checksum
was happening with
[email protected] Node 14.16.0 and on macOS too.
I removed all top level @types/react
references in the yarn.lock and ran yarn again to get around it.
I removed the package that was complaining, ran yarn
, and then re-added the package with yarn add
. This worked for some reason.
I encountered the same issue. Have not found a workaround yet (the above does not work).
@LaurensRietveld what version of yarn are you using? I think I may still be running into this in [email protected]
around @storybook/[email protected]
.
For now, I have
# .yarnrc.yml
# @storybook/addon-storyshots is breaking for some reason...
checksumBehavior: ignore
I'm using [email protected]
. The package involved was the debug
package
Woah, almost double issue number 🎉