Skip to content
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

Linking fails on ReFS: The file exists. (os error -2147024816) during reflink #7554

Closed
2 of 4 tasks
brawaru opened this issue Jan 22, 2024 · 2 comments · Fixed by #7555
Closed
2 of 4 tasks

Linking fails on ReFS: The file exists. (os error -2147024816) during reflink #7554

brawaru opened this issue Jan 22, 2024 · 2 comments · Fixed by #7555

Comments

@brawaru
Copy link

brawaru commented Jan 22, 2024

Verify latest release

  • I verified that the issue exists in the latest pnpm release

pnpm version

8.14.2

Which area(s) of pnpm are affected? (leave empty if unsure)

No response

Link to the code that reproduces this issue or a replay of the bug

No response

Reproduction steps

  1. Create a Dev Drive
  2. Install dependencies for one project to populate cache
  3. Install dependencies for the other project that shares the some modules with the first project

Projects in my case:

  1. https://github.com/modrinth/knossos.git
  2. https://github.com/vintl-dev/nuxt.git

Describe the Bug

pnpm crashes during linking phase due to the reflink error:

> corepack pnpm@latest i
Scope: all 6 workspace projects
Lockfile is up to date, resolution step is skipped
Packages: +1351
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Downloading registry.npmjs.org/@formatjs/intl-displaynames/6.6.6: 6.00 MB/6.00 MB, done
 ERR_PNPM_LINKING_FAILED  Error: The file exists. (os error -2147024816), reflink 'U:\.pnpm-store\v3\files\bc\1a67e67dc75878b982aecde9d07d2b672a42fbd33835d49b25ab34b4ac59d9887c241adaffb56aeccca958cd7545489419bab733d5d1fe359125448e90acd3' -> 'U:\vintl-dev\nuxt\node_modules\.pnpm\https-proxy-agent@7.0.2\node_modules\https-proxy-agent_tmp_21444\dist\index.js'
Progress: resolved 1351, reused 724, downloaded 12, added 430

> 

Expected Behavior

pnpm installs dependencies without any issues

Which Node.js version are you using?

18.19.0

Which operating systems have you used?

  • macOS
  • Windows
  • Linux

If your OS is a Linux based, which one it is? (Include the version if relevant)

No response

@zkochan
Copy link
Member

zkochan commented Jan 22, 2024

cc @nachoaldamav

@nachoaldamav nachoaldamav self-assigned this Jan 22, 2024
@nachoaldamav
Copy link
Contributor

I'm unable to reproduce with the following steps:

mkdir shared-projects
pnpm create vite # call it 'foo'
pnpm create vite # call it 'bar'
# Now, create a .npmrc file with 'store-dir=../shared-store' in both projects
cd foo && pnpm i
cd ../bar && pnpm i

Still, maybe the problem is that we should give our Rust errors the same codes as node, so, if the file exists, we should add the code EEXIST, I think we handle them that way. For now I'll check for errors os error -2147024816 to avoid this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants