On Windows, running pnpm create on the root of a drive (C:\, D:\, etc) throws EPERM: operation not permitted, mkdir <drive letter>. Additionally, running pnpm dlx with any package also fails with the same error if done on the root of a drive.
pnpm version: 7.9.5
Code to reproduce the issue:
PS C:\Users\kidyu> cd ../..
PS C:\> # now we're in the root of drive C
PS C:\> pnpm create vite
EPERM EPERM: operation not permitted, mkdir 'C:\'
PS C:\> # errors, switching to another drive and try pnpm dlx
PS C:\> K:
PS K:\> pnpm dlx create-react-app ./my-app
EPERM EPERM: operation not permitted, mkdir 'K:\'
PS K:\> # still errors
PS K:\> # cd into any folder and use the command inside a folder
PS K:\> mkdir test; cd test
PS K:\test> pnpm create vite
../.pnpm-store/v3/tmp/dlx-125556 | +6 +
Packages are hard linked from the content-addressable store to the virtual store.
Content-addressable store is at: K:\.pnpm-store\v3
Virtual store is at: ../.pnpm-store/v3/tmp/dlx-125556/node_modules/.pnpm
../.pnpm-store/v3/tmp/dlx-125556 | Progress: resolved 6, reused 6, downloaded 0, added 6, done
√ Project name: ... vite-project
√ Select a framework: » vanilla
√ Select a variant: » vanilla
Scaffolding project in K:\test\vite-project...
Done. Now run:
cd vite-project
pnpm install
pnpm run dev
PS K:\test> # command succeded when run inside a folder on the same drive.
Expected behavior:
Should be able to use pnpm create to create new project or use pnpm dlx on the root of the drive, just like when running them inside a folder.
Actual behavior:
Command fails with EPERM: operation not permitted, mkdir
Additional information:
node -v prints: v16.16.0
Windows, macOS, or Linux?: Windows 10 21H2 (Build 19044.1889)
On Windows, running
pnpm create
on the root of a drive (C:\
,D:\
, etc) throwsEPERM: operation not permitted, mkdir <drive letter>
. Additionally, runningpnpm dlx
with any package also fails with the same error if done on the root of a drive.pnpm version: 7.9.5
Code to reproduce the issue:
Expected behavior:
Should be able to use
pnpm create
to create new project or usepnpm dlx
on the root of the drive, just like when running them inside a folder.Actual behavior:
Command fails with
EPERM: operation not permitted, mkdir
Additional information:
node -v
prints: v16.16.0