berry icon indicating copy to clipboard operation
berry copied to clipboard

[Bug?]: yarn installation with local file resolutions

Open marekbuxobucek opened this issue 2 years ago • 3 comments

Self-service

  • [ ] I'd be willing to implement a fix

Describe the bug

I run yarn install on the same device and environment with the same dependencies, It shows me different checksum and hash in yarn.lock for local dependency resolution, after deleting and installing it again.

When using package.json resolutions from file

To reproduce

The suggested Sherlock link is invalid for this step.

"resolutions": { "@types/react": "file:myLocalFolder", },

Environment

This command "yarn dlx -q envinfo --preset jest" ended with no such file or directory error so I got Environment manually.

System:
Microsoft Windows 10 Professional (x64) Build 22621.2715
CPU AMD Ryzen 9 4900HS 3000.0 MHz

Binaries:
yarn 4.0.2
node 20.10.0
npm 10.2.3

Additional context

myLocalFolder includes index.d.ts export {} package.json { "name": "@types/react", "version": "0.0.0" }

marekbuxobucek avatar Dec 13 '23 14:12 marekbuxobucek

Did any change happen to myLocalFolder between the installs? The hash is based on the directory contents.

clemyan avatar Mar 26 '25 14:03 clemyan

I was facing the same issue and it basically blocks our CI from using file protocol. The content of the folder itself (at least the visible files) did not change. Maybe because it's a windows system, there is some hash calculation done on particular file properties or some hidden files. The files are all text and did not change in content between the installs.

julianess avatar Mar 26 '25 14:03 julianess

Did any change happen to myLocalFolder between the installs? The hash is based on the directory contents.

Content of the file remains the same as described in additional context without any further interaction.

marekbuxobucek avatar Mar 26 '25 14:03 marekbuxobucek