Route collisions
What a route-collision finding of fallow dead-code means, why it matters and how to fix it.
What it reports
Two or more Next.js App Router route files resolve to the same URL.
Architecture explains how fallow finds it.
Why it matters
Two or more App Router route files (a page or a route handler) resolve to the same URL within one app-root. Route groups (name) and parallel slots @name do not change the URL, so app/(marketing)/about/page.tsx and app/(shop)/about/page.tsx both own /about. Next.js fails the build ("You cannot have two parallel pages that resolve to the same path") because a URL can have at most one owner, whether a Page or a Route Handler. fallow surfaces every colliding file at once; the build error names only one. Buckets are scoped per app-root (per workspace package), so a monorepo with several independent Next apps sharing a path is not flagged. Files under a private _folder or an intercepting marker (.)/(..)/(...) are excluded. There is no safe auto-fix: move or merge one of the files so each URL has a single owner. The check runs only when the project declares next.
Example
app/(marketing)/about/page.tsx and app/(shop)/about/page.tsx both resolve to the URL /about.
Fix
Move or merge one of the files, so that each URL has one page or one route handler.
Facts
| Fact | Value |
|---|---|
| Issue type | route-collision |
| Rule id in SARIF output | fallow/route-collision |
| Command | fallow dead-code |
| Default severity | error |
Config key in rules | route-collision |
| Suppression comment | // fallow-ignore-file route-collision |
Fixable with fallow fix | No |
| Opt-in | No |
| Frameworks | next |
When to keep the code
- A suppression does not make the build pass. Fix the route files. Use
// fallow-ignore-file route-collisiononly for a short time.