Skip to content

fix: resolve symlinks for pnpm windows bundle - #278

Merged
revmischa merged 1 commit into
mainfrom
fix/pnpm-windows-symlinks
Sep 29, 2026
Merged

revmischa merged 1 commit into
mainfrom
fix/pnpm-windows-symlinks

Conversation

@revmischa

Copy link
Copy Markdown
Member

Rebase of #192 onto main. Same fix as Ben's original, minus the stale lockfile changes.

Compress-Archive doesn't support storing symlinks like zip -y does, so on Windows the pnpm node_modules layout ended up broken in the bundle. Walk node_modules, replace each symlink with a dereferenced copy, then compress.

Two small changes from the original: the temp copy is created next to the symlink instead of in the OS temp dir (renameSync fails across volumes on Windows, and Temp is often on a different drive than the project), and Dirent.parentPath replaces the deprecated Dirent.path.

Fixes #183

Compress-Archive can't store symlinks the way zip -y does, so pnpm's
node_modules layout produced broken bundles on Windows. Dereference
symlinks in node_modules before compressing.

Fixes #183
@revmischa
revmischa merged commit 19e3f2d into main Sep 29, 2026
4 checks passed
@revmischa
revmischa deleted the fix/pnpm-windows-symlinks branch September 29, 2026 06:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix: Usage with PNPM on Windows

2 participants