Replies: 2 comments 2 replies
-
I have the same problem. The yarn.lock was created on macos, and the install is on linux (node:18 docker image)
|
Beta Was this translation helpful? Give feedback.
-
Experiencing the same issue I am however using Yarn 4.5.3 which is pinned in .yarnrc.yml for all devs and pipelines. Running Locally I have recreated the lock file, cleared caches etc but it seems to be a consistent behaviour between my dev machine and pipeline. I have also confirmed that the compressionLevel is the same for all configurations (as there is a bug report mentioning checksum mismatches when compressionLevel is different between configurations) I am currently stumped :/ $ yarn --immutable
➤ YN0000: · Yarn 4.5.3
...
Post-resolution validation
00:00
➤ YN0028: - resolution: "typescript@patch:typescript@npm%3A5.7.2#optional!builtin<compat/typescript>::version=5.7.2&hash=8c6c40"
➤ YN0028: + resolution: "typescript@patch:typescript@npm%3A5.7.2#optional!builtin<compat/typescript>::version=5.7.2&hash=5786d5"
➤ YN0028: - checksum: 10c1/bdf5ab9323d77364de0a7169f77a209110c2e74587eabaf403139a93873bea010fc93f211ae9376fbf8e9bf69ccfaf180b0e5f7bd9a566e26bafc344e320645c
➤ YN0028: The lockfile would have been modified by this install, which is explicitly forbidden. |
Beta Was this translation helpful? Give feedback.
-
Hello everyone,
I am facing an issue while using Yarn 3.5 with TypeScript 5.0.4. I've noticed that the checksum calculated by Yarn for TypeScript patch (compat/typescript) varies depending on the operating system where
yarn install
is executed. Here is an example:On Mac yarn auto-generates the following line:
checksum: 6a1fe9a77bb9c5176ead919cc4a1499ee63e46b4e05bf667079f11bf3a8f7887f135aa72460a4c3b016e6e6bb65a822cb8689a6d86cbfe92d22cc9f501f09213
On Windows yarn auto-generates the following line:
checksum: bb309d320c59a26565fb3793dba550576ab861018ff3fd1b7fccabbe46ae4a35546bc45f342c0a0b6f265c801ccdf64ffd68f548f117ceb7f0eac4b805cd52a9
But if I commit the changed yarn.lock file to Github and run CI/CD pipeline on Linux, the build fails with error:
This is causing a bit of a pain point, as I have to manually remove the checksum each time. I'm aware that the checksum is used for ensuring the integrity of the package, but in this scenario, it seems to create more problems than it solves.
So far, I have not found a way to prevent Yarn from adding the checksum to the lock file. Online search shows that the issue may be related to:
yarn pack
produces slightly different.tgz
files on different operating systems #2774However, I don't see any solutions for my case.
I was wondering if anyone else has encountered this issue and if there are any recommended solutions or workarounds. Is there a way to disable the checksum addition for this specific scenario?
Any help would be greatly appreciated! Thank you.
Beta Was this translation helpful? Give feedback.
All reactions