nextjs - 💡(How to fix) Fix Issue interception routes with static route [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
vercel/next.js#83771Fetched 2026-04-08 02:21:36
View on GitHub
Comments
0
Participants
1
Timeline
2
Reactions
0
Author
Participants
Timeline (top)
issue_type_added ×1labeled ×1

Code Example

Operating System:
  Platform: linux
  Arch: x64
  Version: #1 SMP PREEMPT_DYNAMIC Sun Aug  6 20:05:33 UTC 2023
  Available memory (MB): 4102
  Available CPU cores: 2
Binaries:
  Node: 20.9.0
  npm: 9.8.1
  Yarn: 1.22.19
  pnpm: 8.10.2
Relevant Packages:
  next: 15.6.0-canary.6 // Latest available version is detected (15.6.0-canary.6).
  eslint-config-next: N/A
  react: 19.1.1
  react-dom: 19.1.1
  typescript: 5.3.3
Next.js Config:
  output: N/A
RAW_BUFFERClick to expand / collapse

Goal

I want use interception route for dynamic routes, but not for static

Link to the code that reproduces this issue

https://codesandbox.io/p/devbox/damp-pine-js26gp

To Reproduce

  1. start application (next dev)
  2. click "switch to archive"

Current vs. Expected behavior

Following steps from the previous section, I expect see Archive page, <img width="432" height="112" alt="Image" src="https://github.com/user-attachments/assets/4251be50-f1e3-4b62-94b7-3628bcaa44da" />

but observed interception page for dynamic route.

<img width="408" height="140" alt="Image" src="https://github.com/user-attachments/assets/966b0d61-ea9a-463d-b3b7-d4bfec8fd277" />

Provide environment information

Operating System:
  Platform: linux
  Arch: x64
  Version: #1 SMP PREEMPT_DYNAMIC Sun Aug  6 20:05:33 UTC 2023
  Available memory (MB): 4102
  Available CPU cores: 2
Binaries:
  Node: 20.9.0
  npm: 9.8.1
  Yarn: 1.22.19
  pnpm: 8.10.2
Relevant Packages:
  next: 15.6.0-canary.6 // Latest available version is detected (15.6.0-canary.6).
  eslint-config-next: N/A
  react: 19.1.1
  react-dom: 19.1.1
  typescript: 5.3.3
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

Dynamic Routes

Which stage(s) are affected? (Select all that apply)

next dev (local), next build (local), next start (local)

Additional context

No response

extent analysis

TL;DR

Modify the interception route configuration to exclude dynamic routes that are intended to be static, such as the Archive page.

Guidance

  • Review the Next.js dynamic route configuration to ensure it is correctly set up to handle static pages.
  • Check the next.config.js file for any custom configurations that might be interfering with the dynamic route interception.
  • Verify that the Archive page is correctly defined as a static page in the pages directory.
  • Consider adding a conditional statement to the interception route to bypass static pages.

Example

// Example of conditional statement to bypass static pages
if (router.pathname === '/archive') {
  // Bypass interception for the Archive page
  return NextResponse.next();
}

Notes

The provided code snippet is a hypothetical example and may need to be adapted to the actual codebase. The issue seems to be related to the configuration of dynamic routes in Next.js, and the solution will depend on the specific implementation.

Recommendation

Apply a workaround by modifying the interception route configuration to exclude static pages, as the root cause of the issue is likely related to the dynamic route setup.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING