-
-
Notifications
You must be signed in to change notification settings - Fork 949
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
ERR_PNPM_LINKING_FAILED when running pnpm install
in Docker on macOS
#7024
Comments
pnpm install
in Docker on macOS
Another thread explaining the same issue: https://twitter.com/david_negrier/status/1608012478851743744?s=20 |
Looks like a duplicate of #5803 or at least related |
Im facing same issue but on windows... |
I added this line in .npmrc file and it works like charm! package-import-method=clone-or-copy |
same error occured on windows I just updated the pnpm package and it worked . |
The issue still persists in Windows. |
The way I resolved this issue is the following: I added a postCreateCommand to my devcontainer.json
In the post create script I set the pnpm store to a folder in the user home: I then added a mount in the devcontainer.json file, to mount my host pnpm store folder in the container:
since then pnpm install works without an issue. |
still persisting in windows. For some reason the cypress path is the only one that triggers this bloody error.
|
Same here Q-Q |
Same issue on Arch Linux. I'm not using containers. |
with this works, thank you |
Same issue on multiple windows machines (no docker involved). Tried pnpm |
It seems like running Antivirus software could be the culprit npm/npm#10826 npm/npm#14027 Unfortunately this does not fix it npm/npm#10826 (comment) |
FWIW, npm/npm#10826 (comment) was the clue that got me past this after much thrashing @danielrotaermel (again, windows and no docker) - closed VS Code and suddenly everything worked like a charm. |
Found a way around the file locking by the anti virus software. Rerunning pnpm Maybe there is a way to increase the timeout for retries or at least log whats causing the file lock or something? |
That doesn't work on Linux + zfs (no containers). |
There is copy-clone bug in ZFS that may be related. In my case, setting |
Hey, I had the same issue and managed to get this fixed in my repo https://github.com/panoratech/Panora The solution was to add a line "node-linker=hoisted" to the .npmrc file read more here: https://pnpm.io/npmrc#node-linker Edit: the fix is not working for everyone |
@dotoleeoak thanks! that workaround works!!! |
It worked for me on my intel mac, but not my co-worker with an apple processor based mac.
and it works for both of us. |
I too tried to switch from VirtioFS to gRPC FUSE and was able to run the command without problems. But I noticed that it lowered the I/O efficiency of the containers.
All correct and with VirtioFS. |
* set the package-import-method=hardlink pnpm/pnpm#7024 (comment) * commit recreated pnpm-lock files generated from calling `pnpm i -r` on the command line * remove -r flag in the docker files
Verify latest release
pnpm version
v8.7.1
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
pnpm install
a couple of times inside the containerDescribe the Bug
This article describes the same bug I'm experiencing: https://zenn.dev/minedia/articles/2023-08-30-pnpm#%E4%BD%99%E8%AB%87%3A-pnpm%E3%81%AE%E3%82%A8%E3%83%A9%E3%83%BC
Translated:
![image](https://private-user-images.githubusercontent.com/5361908/264983460-5e3c1e09-d79b-4d1d-b487-50b70c158fda.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk1NTIxODAsIm5iZiI6MTcxOTU1MTg4MCwicGF0aCI6Ii81MzYxOTA4LzI2NDk4MzQ2MC01ZTNjMWUwOS1kNzliLTRkMWQtYjQ4Ny01MGI3MGMxNThmZGEucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDYyOCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA2MjhUMDUxODAwWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NDU3ODI5NjI0MmVkYzkxYjg1NWYxOTQzMmQwNzc1MzYyOGFiMGMyNmRjOWE2MmMwODlkNjEzOTQyNTYzZDQ0MCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.1wQjvcGO76uKv6G1GCzozC4R6EC-Z6SSe2bkLxFadcU)
Basically, it seems like the hard links PNPM uses don't work properly under Docker for macOS.
Expected Behavior
PNPM should work the same way in Docker containers on macOS as it does on Linux and Windows WSL2
Which Node.js version are you using?
18.17.1
Which operating systems have you used?
If your OS is a Linux based, which one it is? (Include the version if relevant)
macOS 12
The text was updated successfully, but these errors were encountered: