Next.js Discord

Discord Forum

parallel routes conflicting with catch all routes

Unanswered
Korat posted this in #help-forum
Open in Discord
KoratOP
I have a project with the following tree,

app
| [locale]
| | [countryCode]
| | | (account)
| | | about
| | | home
| | | privacy
| | | dashboard
| | | | @content
| | | | | affiliate
| | | | | orders
| | | | | tickets
| | | | | page.tsx
| | | | @navbar
| | | | layout.tsx
| | | | page.tsx
| | | [...rest]
| | | | layout.tsx
| | | | page.tsx
| | layout.tsx
| layout.tsx
| not-found.tsx

and I'm having a problem trying to access routes like /:locale/:countrycode/dashboard/tickets for example, I get this error TypeError: Cannot read properties of undefined (reading 'clientModules')

and the only way to fix it is by removing the catch all route, and I have to use the catch all to handle 404 pages, when I try to use normal not-found page inside my [countryCode] folder it either falls back to the one in app root, or it renders next default one, I use the one in root for redirection only but the one in the catch all block has UI and allow the user to choose a lot of other routes, I'm on next 14.2.15 if it helps.

0 Replies