berry: [Bug]: YN0018 in Windows, but not macOS/Linux: "remote archive doesn't match the expected checksum"
Self-service
- I’d be willing to implement a fix
Describe the bug
I just started using Yarn for the first time in a project (Berry, not Classic) and I’m loving it! But I’m now having this issue,
- https://github.com/yarnpkg/berry/issues/1142 (not related to TypeScript)
in GitHub Actions only, not locally.
To reproduce
Here’s the job with the error:
https://github.com/lume/lume/actions/runs/6538252764/job/17753779120
The relevant output there:
➤ YN0000: ┌ Fetch step
Fetch step
➤ YN0018: docsify-cli@https://github.com/trusktr/docsify-cli.git#commit=6f78abeee273c7641e964fb5f9397b6b72e6753b: The remote archive doesn't match the expected checksum
➤ YN0058: three@https://github.com/trusktr/three.js.git#commit=d2fbde04e079890747e318adb2b3b88f8c556d38: Packing the package failed (exit code 1, logs can be found here: C:\Users\RUNNER~1\AppData\Local\Temp\xfs-8ba5194c\pack.log)
➤ YN0000: └ Completed in 9m 1s
➤ YN0000: Failed with errors in 9m 2s
The package docsify-cli
is being installed from git, from github.com/trusktr/docsify-cli
. Does this have anything to do with it perhaps?
I wonder if it is CRLFs…
Is this a known issue with packages installed from git?
Environment
System:
OS: macOS 13.4
CPU: (8) arm64 Apple M2
Binaries:
Node: 20.6.1 - /private/var/folders/7y/wy4mhdj114g5xj1ktvh6hdz80000gn/T/xfs-9bb50836/node
Yarn: 3.6.4 - /private/var/folders/7y/wy4mhdj114g5xj1ktvh6hdz80000gn/T/xfs-9bb50836/yarn
npm: 10.2.0 - ~/.npm-packages/bin/npm
pnpm: 7.24.3 - ~/.npm-packages/bin/pnpm
Additional context
EDIT:
I tried putting .gitattributes
with eol=lf
in the trusktr/docsify-cli
repo (its the add-cors
branch), recreated my yarn.lock, and also added git config core.eol lf && git config core.autocrlf input
to the beginning of my GitHub Actions before it runs the yarn install, but no luck.
About this issue
- Original URL
- State: closed
- Created 8 months ago
- Comments: 15 (3 by maintainers)
Commits related to this issue
- chore(docs): disable yarn --immutable yarn --immutable seems to be unreliable due to https://github.com/yarnpkg/berry/issues/5795 — committed to bdunderscore/modular-avatar by bdunderscore 6 months ago
- chore(docs): disable yarn --immutable yarn --immutable seems to be unreliable due to https://github.com/yarnpkg/berry/issues/5795 — committed to bdunderscore/modular-avatar by bdunderscore 6 months ago
I’m having a very similar issue. When running
yarn install
locally on Windows, I have no problems whatsoever. However, when the CI pipeline runs (this machine is also running Windows), every single package ends up with aThe remote archive doesn't match the expected checksum
error. I don’t want to ignore checksums, so I’m not sure how to proceed at this point.This is happening with Yarn 4.0.1.
I just encountered this. For me, it is not an option to not use git dependencies as I have a forked project and I need to pull it via https. I checked to see if I have any binaries but that’s not the case. Disabling checksums is a workaround but sounds insecure. Do you have any other suggestions as to what might be going on?