oven-sh / bun

Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
https://bun.sh
Other
73.52k stars 2.71k forks source link

Bun: Failed to replace old lockfile with new lockfile on disk on Windows #10651

Open tristan-nsg opened 5 months ago

tristan-nsg commented 5 months ago

What version of Bun is running?

1.1.6+e58d67b46

What platform is your computer?

Microsoft Windows NT 10.0.22631.0 x64

What steps can reproduce the bug?

In a package using package.json (and totally works on Linux) just run bun update and any lockfile related commands will stop working.

image

What is the expected behavior?

Bun to update packages. Bun to install packages.

What do you see instead?

bun install v1.1.6 (e58d67b4)
  🔒 Saving lockfile... EINVAL: Failed to replace old lockfile with new lockfile on disk

Additional information

No response

zC4sTr0 commented 4 months ago

I have the same issue on my windows.

Is your drive external and the source not on C:?

yvvki commented 2 months ago

Does the lockfile involve creating a hard link?

necodess commented 1 month ago

had the same issue. My bun installation was in my C: drive under NTFS and my project was in another drive (exFAT). I saved my projects then reformatted my disk to NTFS, then managed to update/install

yvvki commented 1 month ago

had the same issue. My bun installation was in my C: drive under NTFS and my project was in another drive (exFAT). I saved my projects then reformatted my disk to NTFS, then managed to update/install

It seems that the lockfile creation does require hard link operation as both pre-3.10 ReFS and exFAT does not support hard linking.

This issue then could be more generalized into "Failed to replace old lockfile with new lockfile on disk without hard-link support"