pnpm: ENOENT: no such file or directory,
pnpm version:
6.20.3
Additional information:
node -v
prints: v14.17.0- Windows, macOS, or Linux?: Windows
- Storage device: External Hard Drives
About this issue
- Original URL
- State: open
- Created 3 years ago
- Reactions: 6
- Comments: 37 (3 by maintainers)
Commits related to this issue
- Revert "feat: migrate from npm to pnpm" - see https://github.com/pnpm/pnpm/issues/5638 - see https://github.com/pnpm/pnpm/issues/3952 — committed to organization/alspotron by JellyBrick 8 months ago
when i run
pnpm i
,I also run up the error message :ENOENT: no such file or directory, mkdir '/path'
. After runpnpm config set store-dir ~/pnpm
,It works .try: pnpm store prune
I got the same issue on my exFAT driver, but eventhing is ok on my NTFS driver.
Same problem on Mac OS ENOENT ENOENT: no such file or directory, open ‘/Users/admin/pnpm-virtual-store/eslint@8.7.0/node_modules/eslint/package.json’
Might be a Windows long path issue. We need to somehow print a better error message in this case.
I’m having a similar issue on Linux:
(Username redacted)
Another example of a path it’s expecting is
~/.pnpm-store/v3/tmp/_tmp_185042_9fc50d03248d44ae990d407f1c69215a/docs/Global_.html
.I’ve removed the package lock, removed the
~/.pnpm-store
andnode_modules
, and other variations, with the same result. It gets partway through installation, then stalls when it finds a file it’s apparently expecting but cannot find.Versions:
run
npm i -g pnpm
solved the issue for meTry:rm -rf node_modules && rm pnpm-lock.yaml && pnpm install.
If
pnpm-lock.yaml
is outdated, may carse this issue. so try to delete itI have the same issue. When I add a new package, I have to run
rm -rf /app/.pnpm-store/v3/
first and then pnpm add the new package. Please fix this issue…macbook m1 node -v v16.19.0 pnpm -v 7.25.0
On linux (ubuntu)
rm -rf ~/.local/share/pnpm && pnpm i
solved it for me$ node -v v19.3.0 $ pnpm -v 7.22.0
Nothing above helps. Any news?
This solution worked for me too. I don’t know if that can help but in my case the issue happened after manually removing the root
node_modules
folder.I think this is definitely an exFAT/symlinks issue. It doesn’t work on my exFAT partition, but does on my NTFS one.
Worked for me on linux