overwriteDirSync moves an existing package directory aside before renaming the staged one in. On overlayfs, renaming a directory from a lower layer fails with EXDEV, which happens when node_modules is copied in from an earlier Docker build stage and pnpm prune re-imports a package. Treat EXDEV like EPERM/EACCES/EBUSY: copy a backup aside and remove the target in place. If that removal fails partway, copy the missing entries back from the backup. Closes pnpm/pnpm#17424 --------- Co-authored-by: Zoltan Kochan <z@kochan.io> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
239 B
239 B
@pnpm/fs.indexed-pkg-importer, pnpm
| @pnpm/fs.indexed-pkg-importer | pnpm |
|---|---|
| patch | patch |
pnpm prune --prod no longer fails with ERR_PNPM_EXDEV when node_modules was copied from an earlier Docker build stage #17424.