Skip to content

[Turbopack]: Catch-all routes with nested parallel routes taking over all rendering for any route during r #78519

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

Open
DrewLandgraveCbsi opened this issue Apr 24, 2025 · 0 comments
Labels
Dynamic Routes Related to dynamic routes. linear: turbopack Confirmed issue that is tracked by the Turbopack team. Middleware Related to Next.js Middleware. Parallel & Intercepting Routes Related to Parallel and/or Intercepting routes. Turbopack Related to Turbopack with Next.js.

Comments

@DrewLandgraveCbsi
Copy link

Link to the code that reproduces this issue

https://github.com/DrewLandgrave/turbopack-catch-all-parallel-bug

To Reproduce

  1. Start the application (using turbo dev)

  2. Navigate to localhost:3000/payment/test

  3. The middleware is returning NextResponse.rewrite('/payment/whoops')

  4. Instead of the /payment/whoops/page.tsx page you will see the catch-all page

  5. Start the application (using turbo dev)

  6. Navigate to localhost:3000/payment/test?redirect3. The middleware is returning NextResponse.redirect('/payment/whoops')

  7. The url will change to /payment/whoops but the catch-all page is rendered

  8. Instead of the /payment/whoops/page.tsx page you will see the catch-all page

Current vs. Expected behavior

  1. Start the application (using turbo dev)

  2. Navigate to localhost:3000/anotherRoute/test

  3. The middleware is returning NextResponse.rewrite('/anotherRoute/whoops')

  4. You will see the whoops page with the /anotherRoute/test url

  5. Start the application (using turbo dev)

  6. Navigate to localhost:3000/anotherRoute/test?redirect

  7. The middleware is returning NextResponse.redirect('/anotherRoute/whoops')

  8. You will see the whoops page with the /anotherRoute/whoops url

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 23.5.0: Wed May  1 20:14:38 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T6020
  Available memory (MB): 32768
  Available CPU cores: 12
Binaries:
  Node: 20.15.0
  npm: 10.7.0
  Yarn: N/A
  pnpm: 10.9.0
Relevant Packages:
  next: 15.3.1 // Latest available version is detected (15.3.1).
  eslint-config-next: N/A
  react: 19.1.0
  react-dom: 19.1.0
  typescript: N/A
Next.js Config:
  output: N/A

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

Dynamic Routes, Middleware, Parallel & Intercepting Routes, Turbopack

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

next dev (local)

Additional context

This all works fine with webpack. Only surfacing on Turbopack

https://www.loom.com/share/82a6d0f0899d409e8b9a4b03e9935c30?sid=cb16f696-55aa-417d-93b5-8e8fb5ff5170

@github-actions github-actions bot added Dynamic Routes Related to dynamic routes. Middleware Related to Next.js Middleware. Parallel & Intercepting Routes Related to Parallel and/or Intercepting routes. Turbopack Related to Turbopack with Next.js. labels Apr 24, 2025
@timneutkens timneutkens added the linear: turbopack Confirmed issue that is tracked by the Turbopack team. label Apr 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dynamic Routes Related to dynamic routes. linear: turbopack Confirmed issue that is tracked by the Turbopack team. Middleware Related to Next.js Middleware. Parallel & Intercepting Routes Related to Parallel and/or Intercepting routes. Turbopack Related to Turbopack with Next.js.
Projects
None yet
Development

No branches or pull requests

2 participants