Skip to content

Commit fd47bd3

Browse files
bloveclaude
andauthored
docs: worktree-only Turbopack panic when website .next caches exist (#871)
nx build cockpit dies with 'FileSystemPath(...).join(...) leaves the filesystem root' in a git worktree whenever apps/website/.next or dist/apps/website exists. The caches hold a node_modules symlink whose relative target routes through the MAIN checkout's root — valid on disk, but Turbopack's virtual filesystem refuses to traverse above its project root. Verified: pinning turbopack.root does NOT fix it; clearing the caches does (build goes 1 -> 0). CI is unaffected (fresh, un-nested checkouts). Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
1 parent 5a4a81a commit fd47bd3

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

CONTRIBUTING.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,22 @@ Do not run `npm install` in a worktree on macOS either: it rewrites
5252
`package-lock.json` and drops the Linux `@next/swc-*` bindings, which breaks CI.
5353
`npm ci` is the safe command.
5454

55+
One more worktree-only trap, after install: `nx build cockpit` can die with a
56+
Turbopack panic — `FileSystemPath(...).join(...) leaves the filesystem root`
57+
whenever a website `.next` cache exists anywhere in the workspace
58+
(`apps/website/.next` from `next dev`/e2e, or `dist/apps/website` from a build).
59+
Those caches contain a `node_modules` symlink whose relative target resolves
60+
through the *main* checkout's root; the path is valid on disk, but Turbopack's
61+
virtual filesystem refuses to traverse above its project root and panics.
62+
Pinning `turbopack.root` does not help. Clear the caches instead:
63+
64+
```bash
65+
rm -rf apps/website/.next dist/apps/website && npx nx build cockpit
66+
```
67+
68+
CI never hits this — its jobs build from fresh checkouts that are not nested
69+
inside another checkout.
70+
5571
## Testing
5672

5773
New functionality and bug fixes must include automated tests. Run a project's

0 commit comments

Comments
 (0)