Home  >  Q&A  >  body text

Next.js 13 Application Directory Route Grouping throws "Unmatched path provided for /(public)()"

<p>I'm trying to create different layouts for each routing group, there are 3 layouts: auth, dashboard and public. But when I group the routes I get the error "The path provided for /(public) does not match". This is my folder structure: </p> <p>Is there something wrong with the structure? Or am I missing something? </p>
P粉147747637P粉147747637439 days ago518

reply all(2)I'll reply

  • P粉936509635

    P粉9365096352023-08-31 14:24:56

    View this documentation - https://nextjs.org/docs/app/building-your-application/routing/colocation

    If your (public) group does not have any subpages. Move the subkeys out of the (public) folder, otherwise move page.tsx into the folder representing the route.

    reply
    0
  • P粉403821740

    P粉4038217402023-08-31 12:16:43

    In NextJs version 13.4.12 with Turbopack, I get this error. Just remove "dev": "next dev ---turbo" from your package.json script and replace it with "dev": "next dev" to use webpack again. At least for now, in beta, it may have some bugs.

    reply
    0
  • Cancelreply