[GH-ISSUE #71] Catch-all route params with hyphens cause 404 (e.g. [[...sign-in]]) #16

Closed
opened 2026-05-06 12:36:31 +02:00 by BreizhHardware · 2 comments

Originally created by @solracnyc on GitHub (Feb 25, 2026).
Original GitHub issue: https://github.com/cloudflare/vinext/issues/71

Environment

  • vinext: 0.0.8 (also reproduced on 0.0.5)
  • Next.js: 16.1.6
  • Platform: Cloudflare Workers + vinext dev

Reproduce

  1. Create src/app/sign-in/[[...sign-in]]/page.tsx (standard Clerk catch-all pattern)
  2. vinext dev → visit /sign-in404
  3. Rename to [[...signIn]] → visit /sign-in200

Root cause

The App Router regex uses \w+ for catch-all param names (source), which doesn't match -. Next.js allows hyphens in catch-all param directory names, and Clerk's default setup scaffolds [[...sign-in]] / [[...sign-up]].

Workaround

Rename to camelCase: [[...signIn]] / [[...signUp]]. Neither Clerk page references the param name, so this is safe.

Suggested fix

Change the regex to [\w-]+ or similar to match Next.js behavior.

Verified on 0.0.8 — the routing source still uses \w+.

Originally created by @solracnyc on GitHub (Feb 25, 2026). Original GitHub issue: https://github.com/cloudflare/vinext/issues/71 ## Environment - **vinext**: 0.0.8 (also reproduced on 0.0.5) - **Next.js**: 16.1.6 - **Platform**: Cloudflare Workers + `vinext dev` ## Reproduce 1. Create `src/app/sign-in/[[...sign-in]]/page.tsx` (standard Clerk catch-all pattern) 2. `vinext dev` → visit `/sign-in` → **404** 3. Rename to `[[...signIn]]` → visit `/sign-in` → **200** ## Root cause The App Router regex uses `\w+` for catch-all param names ([source](https://github.com/cloudflare/vinext/blob/4d0a00864446d482e573710e06936ad0cc3e1eb2/packages/vinext/src/routing/app-router.ts)), which doesn't match `-`. Next.js allows hyphens in catch-all param directory names, and Clerk's default setup scaffolds `[[...sign-in]]` / `[[...sign-up]]`. ## Workaround Rename to camelCase: `[[...signIn]]` / `[[...signUp]]`. Neither Clerk page references the param name, so this is safe. ## Suggested fix Change the regex to `[\w-]+` or similar to match Next.js behavior. Verified on 0.0.8 — the routing source still uses `\w+`.
Author
Owner

@southpolesteve commented on GitHub (Feb 25, 2026):

/bigbonk review this PR. Make sure we are matching NextJS behavior and have good test coverage

<!-- gh-comment-id:3962227393 --> @southpolesteve commented on GitHub (Feb 25, 2026): /bigbonk review this PR. Make sure we are matching NextJS behavior and have good test coverage
Author
Owner

@ask-bonk[bot] commented on GitHub (Feb 25, 2026):

Created PR #78

github run

<!-- gh-comment-id:3962304218 --> @ask-bonk[bot] commented on GitHub (Feb 25, 2026): Created PR #78 [github run](/cloudflare/vinext/actions/runs/22416877961)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/vinext#16
No description provided.