Whenever I try to install any package in any project, I get this error that says ERR_PNPM_SYMLINK_FAILED
I get this error when I use pnpm
to install package. The command I used is pnpm i express
.
I get this error in a particular drive in my pc(letter D) But, in other drives, it works fine. The full error message is like below:
/d/server $ pnpm i express
Packages: +62
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
ERR_PNPM_SYMLINK_FAILED Error: UNKNOWN: unknown error, symlink 'D:\server\node_modules\.pnpm\[email protected]\node_modules\accepts\' -> 'D:\server\node_modules\.pnpm\[email protected]\nodmodules\.pnpm\[email protected]\node_modules\accepts\' -> 'D:\server\node_modules\.pnpm\[email protected]\node_modules\accepts'
Progress: resolved 62, reused 0, downloaded 62, added 19
/d/server $
I'm using windows 10 pro here.
This is a new installation of windows, I used to use Linux mint as my daily driver. When I switched to windows 10, I get this error. I tried removing the old .pnpm-store
directory from the drive. But all in vain.
What's wrong with this drive or with pnpm?
I want to fix the issue and want to continue developing in windows machine.
I faced a slightly similar error but mine was an error involving renaming some node_module file when I ran
pnpm install
after doing apnpm create next-app
. If you run this in the same directory do you get similar issues?If so, the issue is likely that the D: drive was formatted as EXFAT and the file's structure or linking wasn't working.
You can attempt an install on an NTFS-formatted drive or C:. For me: Other options I considered trying was running in elevated commands (I use
scoop install sudo & sudo pnpm install
) or run it in WSL