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 -v
prints: v16.6.2- Windows, macOS, or Linux?: macOS
About this issue
- Original URL
- State: open
- Created 3 years ago
- Reactions: 5
- Comments: 37 (8 by maintainers)
This may be related: https://github.com/pnpm/pnpm/issues/2343#issuecomment-893486787
I use
sudo pnpm install
resolve it@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.
After i deleted the
/Users/${user}/.pnpm-store
directory, re-runpnpm i
in my project and it worked.May be this command really needs. #2343
I got this whenever I run
pnpm i
For me in windows, I had to remove the
pnpm
folder on the%USERPROFILE%\AppData\Local
path and the installing it again usingnpm i -g pnpm
@Bosphoramus That fixed it for me on linux. Thanks
fixed this problem after running
pnpm store prune
See: https://pnpm.io/cli/storeok but how did you do that?