R
Reactiflux

help-threads-react

hoangvu12 – 15-33 Sep 16

NNguyen9/16/2023
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
UUUnknown User9/17/2023
2 Messages Not Public
Sign In & Join Server To View
NNguyen9/17/2023
Oh, I fixed this by moving the icons folder in read/layout/[...params]/components to root/components
UUUnknown User9/19/2023
2 Messages Not Public
Sign In & Join Server To View

Looking for more? Join the community!

R
Reactiflux

help-threads-react

Join Server