Next.js 13 Application Directory Route Grouping throws "Unmatched path provided for /(public)()"
P粉147747637
2023-08-30 18:03:35
<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>
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.
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.