docs: worktree-only Turbopack panic when website .next caches exist - #871
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
blove
enabled auto-merge (squash)
August 30, 2026 14:46
Contributor
blove
force-pushed
the
blove/document-turbopack-worktree-panic
branch
from
August 30, 2026 16:19
1b56f4b to
2b4e14f
Compare
Contributor
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>
blove
force-pushed
the
blove/document-turbopack-worktree-panic
branch
from
August 30, 2026 18:48
2b4e14f to
567bfbd
Compare
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes the last open follow-up from the worktree investigation. Docs-only.
nx build cockpitpanics in a git worktree —FileSystemPath(…).join(…) leaves the filesystem root— whenever any website.nextcache exists in the workspace:apps/website/.next(left bynext dev/ the website e2e) ordist/apps/website(left by a build). Those caches contain anode_modulessymlink whose relative target routes through the main checkout's root. The path is valid on disk; Turbopack's virtual filesystem refuses to traverse above its project root and panics.What I verified before writing a word of documentation:
turbopack.rootdoes not fix it — tested, same two panics. The error message's own suggestion is a dead end for this case.A real fix belongs upstream (Turbopack rejecting a disk-valid symlink), so the honest artifact here is the documented workaround in CONTRIBUTING's worktree section:
rm -rf apps/website/.next dist/apps/website && npx nx build cockpit🤖 Generated with Claude Code