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

微信截图_20211106211629

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Reactions: 6
  • Comments: 37 (3 by maintainers)

Commits related to this issue

Most upvoted comments

when i run pnpm i,I also run up the error message : ENOENT: no such file or directory, mkdir '/path'. After run pnpm 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:

$ pnpm install
Scope: all 15 workspace projects
Packages are hard linked from the content-addressable store to the virtual store.
  Content-addressable store is at: /home/<my-username>/.pnpm-store/v3
  Virtual store is at:             node_modules/.pnpm
Downloading registry.npmjs.org/typescript/4.5.4: 11.3 MB/11.3 MB, done
Packages: +1093
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 ENOENT  ENOENT: no such file or directory, open '/home/<my-username>/.pnpm-store/v3/tmp/_tmp_178214_76f20fbd90a8d9baf25801d8b542f5bb/docs/If.html'



Progress: resolved 1120, reused 982, downloaded 104, added 0

(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 and node_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:

  • pnpm 6.23.3
  • npm 8.2.0
  • nodejs 17.2.0
  • kernel x86_64 Linux 5.15.8-arch1-1

run npm i -g pnpm solved the issue for me

Try:rm -rf node_modules && rm pnpm-lock.yaml && pnpm install.

If pnpm-lock.yaml is outdated, may carse this issue. so try to delete it

I 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…

image

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?

when i run pnpm i,I also run up the error message : ENOENT: no such file or directory, mkdir '/path'. After run pnpm config set store-dir ~/pnpm ,It works .

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.

when i run pnpm i,I also run up the error message : ENOENT: no such file or directory, mkdir '/path'. After run pnpm config set store-dir ~/pnpm ,It works .

Worked for me on linux