Vu NguyenV
Reactiflux3y ago
4 replies
Vu Nguyen

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.


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.


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
Was this page helpful?