Turbopack Phantom Module References Causing Panic #89669
Replies: 1 comment 1 reply
-
|
This really looks like two different things happening:
That second error suggests a bug in Turbopack’s module‑graph invalidation when edge middleware files are deleted: it seems to keep references to deleted modules and then gets into a broken state, instead of just throwing a normal “module not found” and recovering. A couple of ideas that might help confirm this and narrow it down:
If you can attach the panic log from |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
CRITICAL BUG REPORT: Turbopack Phantom Module References Causing Panic
Severity: Critical — Blocks entire development workflowEnvironment: v0 Preview with Next.js 16 + TurbopackStatus: Consistently reproducible — Persists after multiple cache clears and file deletions
Summary
Turbopack references deleted middleware files (
./middleware.tsand./lib/supabase/middleware.ts) that no longer exist in the filesystem. The build system attempts to resolve these non-existent files, causing a Turbopack panic and complete dev environment failure. Production builds work fine (clean build environment).Reproduction Steps
middleware.ts(root) andlib/supabase/middleware.tsthat import@supabase/ssrls middleware.ts lib/supabase/middleware.ts→ file not foundnpm run devError Output
Failed Mitigation Attempts
rm -rf .next && npm run dev— Phantom references persistturbopackFileSystemCacheForDev: false— No effectRoot Cause Analysis
System Information
Panic Log Details
Impact
Expected Behavior
Questions for Support
.next/that need manual clearing?Beta Was this translation helpful? Give feedback.
All reactions