vercel / next.js

The React Framework
https://nextjs.org
MIT License
124.28k stars 26.49k forks source link

Turbopack doesn't correctly handle catch-all segments in nested route groups #67045

Closed grahamorrell closed 4 days ago

grahamorrell commented 2 months ago

Link to the code that reproduces this issue

https://github.com/NorthLink-Digital/turbo-catch-all-issue

To Reproduce

Above repo is plain create-next-app with minimal folders/pages added to recreate the issue

Start in normal dev mode (pnpm dev)

Start in dev turbo mode (pnpm dev:turbo)

Current vs. Expected behavior

Following the steps in the previous section, when running with turbo, when hitting http://localhost:3000/admin I should see ADMIN PAGE not CMS PAGE

Provide environment information

Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 11 Home
  Available memory (MB): 32603
  Available CPU cores: 8
Binaries:
  Node: 20.9.0
  npm: N/A
  Yarn: N/A
  pnpm: 8.6.10
Relevant Packages:
  next: 14.2.4 // Latest available version is detected (14.2.4).
  eslint-config-next: 14.2.4
  react: 18.3.1
  react-dom: 18.3.1
  typescript: 5.4.5
Next.js Config:
  output: N/A

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

Turbopack

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

next dev (local)

Additional context

No response

timneutkens commented 1 month ago

Thanks for the report and reproduction! Very helpful 🙏