Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Route interception broken in production mode, although working in development mode #65192

Open
IddanCF opened this issue Apr 30, 2024 · 0 comments
Labels
bug Issue was opened via the bug report template. linear: next Confirmed issue that is tracked by the Next.js team. Parallel & Intercepting Routes Related to Parallel and/or Intercepting routes.

Comments

@IddanCF
Copy link

IddanCF commented Apr 30, 2024

Link to the code that reproduces this issue

https://github.com/IddanCF/repro-next-intercept

To Reproduce

  1. Start the application in dev mode (npm run dev)
  2. Open http://localhost:3000/, click the 'Interception link' to see the modal
  3. Now run the project in production mode (npm run build npm start)
  4. Click the 'interception link'. It navigates to the page instead of showing the modal

Current vs. Expected behavior

I expected the modal to keep working similar to how it does in dev mode, also in production mode.

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 23.4.0: Fri Mar 15 00:12:25 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T6030
  Available memory (MB): 18432
  Available CPU cores: 11
Binaries:
  Node: 20.11.0
  npm: 10.5.2
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  next: 14.2.3 // Latest available version is detected (14.2.3).
  eslint-config-next: N/A
  react: 18.3.1
  react-dom: 18.3.1
  typescript: 5.1.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 start (local), Vercel (Deployed)

Additional context

The [slug] at the root, and generateStaticParams in layout seem to be required for this bug to occur.

I also added another link without route interception to make sure it is not a problem with the @modal slot.

NEXT-3295

@IddanCF IddanCF added the bug Issue was opened via the bug report template. label Apr 30, 2024
@github-actions github-actions bot added the Parallel & Intercepting Routes Related to Parallel and/or Intercepting routes. label Apr 30, 2024
@IddanCF IddanCF changed the title Route interception works on dev but not on production build Route interception broken in production mode, although working in development mode Apr 30, 2024
@github-actions github-actions bot added the linear: next Confirmed issue that is tracked by the Next.js team. label May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue was opened via the bug report template. linear: next Confirmed issue that is tracked by the Next.js team. Parallel & Intercepting Routes Related to Parallel and/or Intercepting routes.
Projects
None yet
Development

No branches or pull requests

1 participant