Vu Nguyen
Vu Nguyen15mo ago

hoangvu12 – 15-33 Sep 16

I'm using NextJS 13 App dir, when I try to start the project, I got this error
Error: Catch-all must be the last part of the URL.
Error: Catch-all must be the last part of the URL.
I don't know why it cause that, I've seen some github issues and someone mentioned:
It's because you have sub routes inside the catch all route, which for example might [...nextAuth]. If you have sub routes inside catch all routes, it will throw an error. You need to move out the sub routes to anther route.
It's because you have sub routes inside the catch all route, which for example might [...nextAuth]. If you have sub routes inside catch all routes, it will throw an error. You need to move out the sub routes to anther route.
But my app structure looking fine to me, but for some reason it still throwing that error Here is my app structure:
app
(default)
components // store components, don't have any page.tsx inside it
details
[...params]
components // store components, don't have any page.tsx inside it
page.tsx
page.tsx
not-found.tsx
read
layout.tsx
[...params]
components // store components, don't have any page.tsx inside it
icons // store icon components
constants.ts
page.tsx
store.ts
app
(default)
components // store components, don't have any page.tsx inside it
details
[...params]
components // store components, don't have any page.tsx inside it
page.tsx
page.tsx
not-found.tsx
read
layout.tsx
[...params]
components // store components, don't have any page.tsx inside it
icons // store icon components
constants.ts
page.tsx
store.ts
4 Replies
Unknown User
Unknown User15mo ago
Message Not Public
Sign In & Join Server To View
Vu Nguyen
Vu NguyenOP15mo ago
Oh, I fixed this by moving the icons folder in read/layout/[...params]/components to root/components
Unknown User
Unknown User15mo ago
Message Not Public
Sign In & Join Server To View
reactibot
reactibot15mo ago
This thread hasn’t had any activity in 36 hours, so it’s now locked. Threads are closed automatically after 36 hours. If you have a followup question, you may want to reply to this thread so other members know they're related. https://discord.com/channels/102860784329052160/902647189120118794/1152628355661828116