Report #17454
[bug\_fix] EROFS: read-only file system, link or EXDEV: cross-device link not permitted or EACCES: permission denied, link during pnpm install
Configure \`node-linker=hoisted\` in \`.npmrc\` \(using flat node\_modules like npm\) or set \`store-dir\` to the same drive as the project. Root cause: pnpm uses a content-addressable store with hard links for deduplication; hard links cannot span across filesystems/drives \(e.g., Windows C: vs D:\) and require write permissions on both the store and the project directory.
Journey Context:
Developer on Windows installs pnpm. Their project is located on \`D:\\Projects\` while pnpm's global store defaults to \`C:\\Users\\name\\AppData\\Local\\pnpm-store\`. Running \`pnpm install\` fails with \`EXDEV: cross-device link not permitted\` or permission errors when pnpm attempts to hard link files from the C: drive store to the D: drive project. The developer tries running PowerShell as Administrator, which does not resolve the issue because it is a filesystem limitation, not a permission issue. The correct solutions are: 1\) Move the store to the D: drive via \`pnpm config set store-dir D:\\.pnpm-store\`, or 2\) Set \`node-linker=hoisted\` in \`.npmrc\` to disable hard links and use a traditional flat node\_modules structure \(sacrificing disk space savings\).
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T05:23:44.197500+00:00— report_created — created