I hope someone might be able to help.
I have this page structure in my NextJS 14 app:
app/
(admin)/
layout.tsx
(web)/
layout.tsx
page.tsx
not-found.tsx
Note that i don’t have a layout.tsx page at the app/ folder level, but multiple root layout inside each route group. The problem i encounter is that NextJS throws an exception pointing out that, the not-found.tsx doesn’t have a layout.tsx associated to it.
I tried to put the not-found.tsx inside each route group, but it is not detected, each time a route doesn’t exist, the app fallback to the default 404 page.
How could i make this work ?
Gilles is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.