-
-
Notifications
You must be signed in to change notification settings - Fork 952
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
ENOENT: no such file or directory, copyfile '/project/.pnpm-store/... -> '/project/node_modules/... #5803
Comments
that happens on mac, only working fix is to move the store directory outside of the volume mount, or dont use hardlinks. after that error happens, pnpm store status should give the exact same error as above. removing the store then does nothing. either use mutagen, if you need the volume mount (i imagine for indexing in vscode that would be neat) or just ditch pnpm (or docker for that matter) i had some hope when virtiofs went out of beta for docker for desktop, but its still happening here as well. bug was reported multiple times already, they cant fix it. only difference now is, that until now there existed a file with the same name, but with strange modes (sorry cant remember) set and .exec appended to the name. this is no longer the case, when you check now, the file exists, so might be a race condition somewhere. "99 got problems multithreading but aint one" oh, and another solution is to just run pnpm install until it exits 0 :P |
The store was getting created on the same directory level as the project's Running # ...
RUN npm install --global pnpm@latest \
&& SHELL=bash pnpm setup \
&& source /root/.bashrc \
&& pnpm config set store-dir /root/.local/share/pnpm/store |
pnpm in devcontainers is completely unsuable for me, even with @o-az suggestion |
the suggestion is basically to use copy, because /root is on a different file system, so no hardlinking. pnpm is just broken |
Appreciate the help @rdss-dheuskel! I'm not a Docker guru at all, I'm sure you're more knowledgable, but COPY would bring over potentially GB's worth of data right? Especially in a monorepo. Is there anything officially referencing this issue and the incompatibility of pnpm with docker/devcontainers? Prisma's repo uses pnpm in their devcontainer albeit I believe they are using a custom image with pnpm preinstalled. Definitely a giant obstacle for me atm. |
I dunno about COPY. @amlcodes what does your devcontainer.json and Dockerfile look like? I'll try to help |
I also have this kind of messages, only when using VirtioFS on mac Docker. As it's already been told, it looks like a race condition: if running several times, the error message is different each time (even if each time is for a "clean" base, just checked out from repository)... gRPS FUSE with virtualisation framework seem to deliver decent performances, so as it's important for me to work in an isolated env (vscode devcontainer) I'll stick to that waiting for this issue to get resolved (by pnpm or docker).... We should find a way for @zkochan to get his hands on an M1/M2 computer for him to be able to handle this kind of "mac-only" bug... |
I found a very quick reproduction recipe using Docker Desktop for Mac with the file sharing implementation set to gRPC FUSE or VirtioFS but not osxfs (Legacy). Run this from an empty directory: docker run --rm -v "$(pwd):/vol" -w /vol -t node:alpine corepack pnpm install \
https://codeload.github.com/postcss/postcss-media-minmax/tar.gz/refs/tags/5.0.0 This fails with an |
This is just an update, not complaining cause I found a short term solution: I'm using latest pnpm and this issue still present. |
As @rdss-dheuskel says, the reproduced steps are:
I hope it can help you to reproduce it 😃 @zkochan |
I wasn't able to reproduce it
That shouldn't be a problem as pnpm automatically falls back to copy if hard link creation fails. This one does fail but not always:
Also, looks like if I connect to the container and run |
Hi @zkochan. Appreciate your effort on this. Please try steps below to reproduce it. Thanks!
|
Inspired by @andersk, setting container file sharing to |
The thing is that osxfs has bad performance compared to grpc, and even worse compared to virtiofs... |
Orbstack(Docker Desktop alternative) has only VirtioFS, any working solution for it? |
I can't install the package below on devContainer node.js 18 and the latest version of PNPM on MacOS because of the same error message. Any plan to solve this issue? It reported around 1 year ago. 😞 |
This issue seems related: Can you please fix this? |
I'm not using docker though I get the same issue on Arch Linux. |
I'm hitting this, on ZFS, on a fast NVME. It's easy to repro, I can delete the pnpm cache (which is stored under |
Damn that's it then, zfs 2.2 on a PCIe4 NVME here. |
I'm having the same issue with devcontainers. Is there any workaround for this or we just can't use pnpm with containers ? |
…/.pnpm-store/... -> '/project/node_modules/... #5803]
@zkochan I'd like to try to fix this issue. I have no idea on how navigate the codebase; can you share some tips on how/where I can look? Adding to the issue: I noticed that the problem arise only when installing multiple packages. Installing few of them the installation process succeed. |
Just use pnpm 8.6.* instead. |
On latest node.js, npm and pnpm i get a similar error: This is on a clean repository, first time install. Already tried to prune, remove cache, reinstall.. It works fine with npm, but not at all with pnpm. On a Macbook Pro M3 in Windows on Parallels. To me it either is an issue with the installation (https://stackoverflow.com/questions/77297035/pnpm-install-error-enoent-no-such-file-or-directory) or with mapped directories / the file system. |
Here we were running We run this command, after PNPM has been installed globally with NPM under the unprivileged
|
pnpm version: 7.18.2
Code to reproduce the issue: (running vscode devcontainer)
Expected behavior:
It should install packages with no errors.
Actual behavior:
Additional information:
node -v
prints: v18.12.1The text was updated successfully, but these errors were encountered: