Link to the code that reproduces this issue
https://github.com/stefanprobst/issue-next-not-found-route-group
To Reproduce
- clone the repo
pnpm install && pnpm build && pnpm start
- open http://localhost:3000/not-existing-route
- see the built-in default not-found page being displayed, not the one from
/app/(app)/not-found.tsx
Current vs. Expected behavior
the custom root not-found page is not shown for e.g. http://localhost:3000/not-existing-route because it lives in a route group (instead the built-in default 404 page is shown):
└── app
└── (app)
├── layout.tsx
├── not-found.tsx
└── page.tsx
it only works correctly when getting rid of the route group (check out the no-route-group branch)
└── app
├── layout.tsx
├── not-found.tsx
└── page.tsx
Provide environment information
Operating System:
Platform: linux
Arch: x64
Version: #49-Ubuntu SMP PREEMPT_DYNAMIC Mon Nov 4 02:06:24 UTC 2024
Available memory (MB): 32041
Available CPU cores: 4
Binaries:
Node: 22.11.0
npm: 10.9.0
Yarn: N/A
pnpm: 9.14.2
Relevant Packages:
next: 15.0.4-canary.32 // Latest available version is detected (15.0.4-canary.32).
eslint-config-next: N/A
react: 19.0.0-rc-b01722d5-20241114
react-dom: 19.0.0-rc-b01722d5-20241114
typescript: 5.7.2
Next.js Config:
output: N/A
Which area(s) are affected? (Select all that apply)
Navigation
Which stage(s) are affected? (Select all that apply)
next dev (local), next start (local)
Additional context
No response
Link to the code that reproduces this issue
https://github.com/stefanprobst/issue-next-not-found-route-group
To Reproduce
pnpm install && pnpm build && pnpm start/app/(app)/not-found.tsxCurrent vs. Expected behavior
the custom root not-found page is not shown for e.g. http://localhost:3000/not-existing-route because it lives in a route group (instead the built-in default 404 page is shown):
it only works correctly when getting rid of the route group (check out the no-route-group branch)
Provide environment information
Operating System: Platform: linux Arch: x64 Version: #49-Ubuntu SMP PREEMPT_DYNAMIC Mon Nov 4 02:06:24 UTC 2024 Available memory (MB): 32041 Available CPU cores: 4 Binaries: Node: 22.11.0 npm: 10.9.0 Yarn: N/A pnpm: 9.14.2 Relevant Packages: next: 15.0.4-canary.32 // Latest available version is detected (15.0.4-canary.32). eslint-config-next: N/A react: 19.0.0-rc-b01722d5-20241114 react-dom: 19.0.0-rc-b01722d5-20241114 typescript: 5.7.2 Next.js Config: output: N/AWhich area(s) are affected? (Select all that apply)
Navigation
Which stage(s) are affected? (Select all that apply)
next dev (local), next start (local)
Additional context
No response