Some checks failed
Test examples / Test Examples (20) (push) Has been cancelled
Test examples / Test Examples (22) (push) Has been cancelled
Lock Threads / action (push) Has been cancelled
Trigger Release / start (push) Has been cancelled
Stale issue handler / stale (push) Has been cancelled
Update Font Data / create-pull-request (push) Has been cancelled
build-and-deploy / deploy-target (push) Has been cancelled
build-and-deploy / build (push) Has been cancelled
build-and-deploy / stable - aarch64-unknown-linux-musl - node@16 (push) Has been cancelled
build-and-deploy / stable - x86_64-unknown-linux-musl - node@16 (push) Has been cancelled
build-and-deploy / stable - aarch64-unknown-linux-gnu - node@16 (push) Has been cancelled
build-and-deploy / stable - x86_64-unknown-linux-gnu - node@16 (push) Has been cancelled
build-and-deploy / stable - aarch64-pc-windows-msvc - node@16 (push) Has been cancelled
build-and-deploy / stable - x86_64-pc-windows-msvc - node@16 (push) Has been cancelled
build-and-deploy / stable - aarch64-apple-darwin - node@16 (push) Has been cancelled
build-and-deploy / stable - x86_64-apple-darwin - node@16 (push) Has been cancelled
build-and-deploy / build-wasm (nodejs) (push) Has been cancelled
build-and-deploy / build-wasm (web) (push) Has been cancelled
build-and-deploy / Deploy preview tarball (push) Has been cancelled
build-and-deploy / Potentially publish release (push) Has been cancelled
build-and-deploy / publish-turbopack-npm-packages (push) Has been cancelled
build-and-deploy / Deploy examples (push) Has been cancelled
build-and-deploy / thank you, build (push) Has been cancelled
build-and-deploy / Upload Turbopack Bytesize metrics to Datadog (push) Has been cancelled
Rspack Next.js development integration tests / Rspack integration tests (push) Has been cancelled
Rspack Next.js production integration tests / Rspack integration tests (push) Has been cancelled
Turbopack Next.js development integration tests / Next.js integration tests (push) Has been cancelled
Turbopack Next.js production integration tests / Next.js integration tests (push) Has been cancelled
Update Rspack test manifest / Update and upload Rspack development test manifest (push) Has been cancelled
Update Rspack test manifest / Update and upload Rspack production test manifest (push) Has been cancelled
Upload bundler test manifests to areweturboyet.com / Upload test results (push) Has been cancelled
Update React / create-pull-request (push) Has been cancelled
test-e2e-project-reset-cron / reset-test-project (push) Has been cancelled
Notify about the top 15 issues/PRs/feature requests (most reacted) in the last 90 days / run (push) Has been cancelled
Build Error Scenarios
This fixture contains scenarios that SHOULD throw MissingDefaultParallelRouteError during build.
Why These Should Error
All scenarios in this fixture have:
- ✅ Parallel routes (slots starting with
@) - ❌ NO
default.tsxfiles for those parallel routes - ✅ Child routes that make these non-leaf segments
The presence of child routes means default.tsx files are required for the parallel slots.
Scenario 1: Non-Leaf Segment with Children
Path: /with-children
app/with-children/
├── @header/
│ └── page.tsx ← Has page.tsx
│ ❌ NO default.tsx! ← Missing default.tsx
├── @sidebar/
│ └── page.tsx ← Has page.tsx
│ ❌ NO default.tsx! ← Missing default.tsx
├── layout.tsx ← Uses @header and @sidebar
├── page.tsx ← Parent page
└── child/
└── page.tsx ← ⚠️ CHILD ROUTE EXISTS!
Expected Error:
MissingDefaultParallelRouteError:
Missing required default.js file for parallel route at /with-children/@header
The parallel route slot "@header" is missing a default.js file.
Why it errors:
- When navigating from
/with-childrento/with-children/child, the routing system needs to know what to render for the@headerand@sidebarslots - Since
/with-children/childdoesn't define these parallel routes, Next.js looks fordefault.tsxfiles - No
default.tsxfiles exist → ERROR!
Scenario 2: Non-Leaf with Route Groups and Children
Path: /with-groups-and-children
app/with-groups-and-children/(dashboard)/(overview)/
├── @analytics/
│ └── page.tsx ← Has page.tsx
│ ❌ NO default.tsx! ← Missing default.tsx
├── @metrics/
│ └── page.tsx ← Has page.tsx
│ ❌ NO default.tsx! ← Missing default.tsx
├── layout.tsx ← Uses @analytics and @metrics
├── page.tsx ← Parent page
└── nested/
└── page.tsx ← ⚠️ CHILD ROUTE EXISTS!
Route Groups: (dashboard) and (overview) don't affect the URL
Expected Error:
MissingDefaultParallelRouteError:
Missing required default.js file for parallel route at /with-groups-and-children/(dashboard)/(overview)/@analytics
The parallel route slot "@analytics" is missing a default.js file.
Why it errors:
- Even with route groups, the segment has a child route (
/nested) - The
hasChildRoutesForSegment()helper correctly:- Filters out route groups
(dashboard)and(overview) - Detects the
nested/page.tsxchild route - Identifies this as a non-leaf segment
- Filters out route groups
- No
default.tsxfiles exist → ERROR!
How to Fix These Errors
To make these scenarios build successfully, add default.tsx files:
For Scenario 1:
// app/with-children/@header/default.tsx
export default function HeaderDefault() {
return <div>Header Fallback</div>
}
// app/with-children/@sidebar/default.tsx
export default function SidebarDefault() {
return <div>Sidebar Fallback</div>
}
For Scenario 2:
// app/with-groups-and-children/(dashboard)/(overview)/@analytics/default.tsx
export default function AnalyticsDefault() {
return <div>Analytics Fallback</div>
}
// app/with-groups-and-children/(dashboard)/(overview)/@metrics/default.tsx
export default function MetricsDefault() {
return <div>Metrics Fallback</div>
}
Contrast with no-build-error Fixture
The no-build-error fixture has similar parallel routes but:
- ❌ NO child routes (leaf segments)
- ✅
default.tsxfiles are NOT required
This fixture (build-error) has:
- ✅ Child routes exist (non-leaf segments)
- ❌
default.tsxfiles ARE required but missing → ERROR!