npmnode.js90% confidence\u2191 9

pnpm install: ERR_PNPM_LINKING_FAILED ("operation not permitted, rename[...]")

Full error message
I started on a completely fresh Windows (11) system, installed Node, pnpm and so on. When running pnpm install, I've got the following error:

"ERR_PNPM_LINKING_FAILED Error: EPERM: oprtation not permitted, rename [...]":

pnpm version: 8.7.6
node version: 18.18.0

It seems like from time to time this issue comes up because one can find several discussions about similar topics:

ERR_PNPM_LINKING_FAILED when running pnpm install in Docker on macOS
npm ERR! Error: EPERM: operation not permitted, rename

The second one looked promising but removing node_modules, pnpm prune and so on did not help in my case. I also checked the permissions for the directory, ran the commands in the admin PoweShell, did the same within the Git Bash but the error is still there.

It turned out that the pnpm version 8.7.6 seems to be the problem. I found two ways to solve/mitigate the problem: use another pnpm version... I saw that pnpm v8.8.0 was released in the meantime and tested it. It looks like the error is gone (npm install -g [email protected] or npm install -g pnpm@latest) otherwise a downgrade would also help running pnpm install again and again until it completes without erros is also a workaround. Every time you execute the command another package will throw the error until all problems are solved.

API access

Get this solution programmatically \u2014 free, no authentication.

curl https://depscope.dev/api/error/54f43850b945a84a32f42800e7385da2d44f74cae2d42dfcac628fd8ad8a4fc9
hash \u00b7 54f43850b945a84a32f42800e7385da2d44f74cae2d42dfcac628fd8ad8a4fc9
pnpm install: ERR_PNPM_LINKING_FAILED ("operation not p… — DepScope fix | DepScope