0
Fork 0
mirror of https://github.com/TanStack/router.git synced 2026-11-16 19:38:07 +00:00

test(compiler-test-utils,router-generator): link the test apps' node_modules with symbolic links, not junctions (Windows)

pnpm links workspace packages on Windows with relative directory symbolic
links where it may create them (the CI runners). Windows resolves a
relative symbolic link reached through a junction against the junction's
own path, not its target's, so through the junctions the harnesses made
to the packages' `node_modules`, `@tanstack/react-router` led nowhere:
`existsSync` was false and Node's, Vite's and the optimizer's resolvers
all missed it ("Cannot find module '@tanstack/react-router'" in the
generator's consumer runs; the dev servers served the router package raw
with its CommonJS dependency, after "Failed to resolve dependency ...
present in optimizeDeps.include"). Verified in a diagnostic run of the
Compiler Platforms workflow: a directory symbolic link resolves, a
junction does not, on either drive. `linkDirectory` makes a symbolic
link and falls back to a junction where the process may not (where pnpm
falls back too, so its own links are absolute).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Sheraff 2026-10-26 13:11:52 +01:00
commit 64b41c0fb9
No known key found for this signature in database
4 changed files with 71 additions and 17 deletions