nextjs - 💡(How to fix) Fix intercepting routes are broken in next.js 16 when trailingSlash option set to true [4 comments, 4 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#87140Fetched 2026-04-08 02:07:42
View on GitHub
Comments
4
Participants
4
Timeline
9
Reactions
0
Author
Timeline (top)
commented ×4labeled ×2closed ×1issue_type_added ×1

Code Example

import type { NextConfig } from 'next';

const nextConfig: NextConfig = {
    trailingSlash: true,
};
export default nextConfig;

---

Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 11 Pro
  Available memory (MB): 32174
  Available CPU cores: 22
Binaries:
  Node: 20.19.4
  npm: 10.8.2
  Yarn: 1.22.22
  pnpm: N/A
Relevant Packages:
  next: 16.0.10 // Latest available version is detected (16.0.10).
  eslint-config-next: N/A
  react: 19.2.3
  react-dom: 19.2.3
  typescript: 5.9.3
Next.js Config:
  output: N/A
RAW_BUFFERClick to expand / collapse

Link to the code that reproduces this issue

https://github.com/vercel/nextgram

To Reproduce

  1. Clone this official example with the intercepting routes modals: https://github.com/vercel/nextgram
  2. Update next.js version to the latest version (16.0.10 for example)
  3. Create next.config.ts in the root folder and insert this code:
import type { NextConfig } from 'next';

const nextConfig: NextConfig = {
    trailingSlash: true,
};
export default nextConfig;
  1. Run an example app and click on any photo. It will open in a separate static page, not as a popup.
  2. Set trailingSlash to false, restart an app and click on any photo - it will open as a popup.

Current vs. Expected behavior

Popups that are implemented as intercepting routes must open as a popups, not as a static pages on client. This works on next.js 15 as needed, but it is broken in next.js 16.

Provide environment information

Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 11 Pro
  Available memory (MB): 32174
  Available CPU cores: 22
Binaries:
  Node: 20.19.4
  npm: 10.8.2
  Yarn: 1.22.22
  pnpm: N/A
Relevant Packages:
  next: 16.0.10 // Latest available version is detected (16.0.10).
  eslint-config-next: N/A
  react: 19.2.3
  react-dom: 19.2.3
  typescript: 5.9.3
Next.js Config:
  output: N/A

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

Parallel & Intercepting 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

Setting trailingSlash to false in next.config.ts may resolve the issue with intercepting routes modals not opening as popups in Next.js 16.

Guidance

  • Verify that the issue is specific to Next.js 16 by testing with version 15 to confirm the expected behavior.
  • Try setting trailingSlash to false in next.config.ts and restart the app to see if the popups work as expected.
  • Check the Next.js documentation for any changes or updates related to intercepting routes and trailing slashes in version 16.
  • If setting trailingSlash to false resolves the issue, investigate potential implications for other routes or functionality in the app.

Notes

The provided information suggests a potential fix, but further testing and verification are necessary to ensure that this solution works for all use cases and does not introduce other issues.

Recommendation

Apply workaround: setting trailingSlash to false may resolve the issue, but it is essential to test and verify the fix to ensure it does not affect other parts of the application.

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

nextjs - 💡(How to fix) Fix intercepting routes are broken in next.js 16 when trailingSlash option set to true [4 comments, 4 participants]