next: route summary drops all `ƒ` dynamic routes (reports "1 routes" for an 18-route build)
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 81.1k
- Forks
- 5.1k
- Avg merge
- 4d 21h
- Merged PRs (30d)
- 35
Description
Summary
rtk next reports the route table of a Next.js 15 build almost entirely wrong: it counts the ○ (static) marker but not the ƒ (dynamic) one, so every dynamic route disappears from the summary. On an 18-route app it reported one route.
Because the summary looks well-formed and reports Errors: 0, there is nothing to suggest the numbers are wrong.
Environment
- rtk 0.45.0 (also reproduced on 0.42.4 — upgrading does not change it)
- next 15.3.8, App Router
- Linux x86_64, glibc 2.39
What happens
$ rtk next
Next.js Build
1 routes (1 static, 0 dynamic)
Time: 1000ms | Errors: 0 | Warnings: 0
The same build run through ./node_modules/.bin/next build has 18 routes — 1 static (○ /_not-found) and 17 dynamic (ƒ):
Route (app) Size First Load JS
┌ ƒ / 184 B 105 kB
├ ○ /_not-found 977 B 102 kB
├ ƒ /admin/casas 184 B 105 kB
...
└ ƒ /pase/[id] 184 B 105 kB
○ (Static) prerendered as static content
ƒ (Dynamic) server-rendered on demand
1 static matches the one ○ row exactly, and 0 dynamic matches none of the 17 ƒ rows — which is what points at the marker parsing rather than at the build.
Expected
18 routes (1 static, 17 dynamic).
Reproducing
Any Next 15 App Router project with at least one dynamic route:
npx create-next-app@latest rtk-repro --app --ts
cd rtk-repro
# create-next-app's default page is static, so force one route dynamic:
echo 'export const dynamic = "force-dynamic";' >> app/page.tsx
rtk next
app/page.tsx renders as ƒ in the real build and should appear in the dynamic count.
Second, smaller thing in the same output
Time: 1000ms is Next's own compile time (✓ Compiled successfully in 1000ms) relabelled as total build time. That build took 15.7s wall clock. Worth either renaming the field to compile time or measuring the whole run.
Not re-reporting
The third thing I hit — a failing build collapsing to Errors: 1 with no file, line, or message, identical at -vv — is already open as #2013, so I've left it there.
Workaround
# ~/.config/rtk/config.toml
[hooks]
exclude_commands = ["next"]
Worth noting for anyone else who lands here: this matches on the command's leading word, so it covers next build but not npx next build. rtk npm run build is unaffected either way — it passes the full, correct route table through, so only the dedicated next handler is involved.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the dedicated rtk next handler and reproduce the issue with a Next.js 15 App Router project containing a dynamic route. Compare the parsed ○ and ƒ build markers with the real route table, then verify that rtk next reports all routes, including the 17 dynamic routes in the example; also check whether the reported time should remain compile time or represent the whole build.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- next.js, rust
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100