pnpm: EPERM: operation not permitted, chmod
pnpm version: 6.14.2
Code to reproduce the issue:
ERROR EPERM: operation not permitted, chmod '/Users/hronro/Projects/my-project/node_modules/.pnpm/rimraf@3.0.2/node_modules/rimraf/bin.js'
at pnpm/rimraf
Additional information:
node -vprints: v16.6.2- Windows, macOS, or Linux?: macOS
About this issue
- Original URL
- State: open
- Created 5 years ago
- Reactions: 7
- Comments: 42 (9 by maintainers)
@zkochan I fixed this by deleting the whole pnpm global cache directory. I guess there are some files with incorrect permissions in the global cache directory.
Fixed it on Linux deleting this folder:
~/.local/share/pnpm/store/v3/filesThis may be related: https://github.com/pnpm/pnpm/issues/2343#issuecomment-893486787
I use
sudo pnpm installresolve itfixed this problem after running
pnpm store pruneSee: https://pnpm.io/cli/storeI got this whenever I run
pnpm iDowngrading to pnpm 7 fixed it for me
npm i -g pnpm@7. Looks like pnpm 8 is so fast that Windows unlocks files after using them slower than pnpm tries to use them again.For me in windows, I had to remove the
pnpmfolder on the%USERPROFILE%\AppData\Localpath and the installing it again usingnpm i -g pnpmAfter i deleted the
/Users/${user}/.pnpm-storedirectory, re-runpnpm iin my project and it worked.May be this command really needs. #2343
(base) ➜ frontend git:(main) rm -r ~/.local/share/pnpm/store/v10/files
Worked for me
rm -r ~/.local/share/pnpm/store/v10/filespnpm@10.0.0 wsl2
This command fixed my issue on Ubuntu, thanks @Bosphoramus
@Bosphoramus That fixed it for me on linux. Thanks
Even with an administrator commandline on windows I get the same error. I got the same error on several projects , and I couldn’t resolve it , so sadly I had to get back to the old npm. Windows 10 Nodejs v18.15.0 Nextjs
ok but how did you do that?