Reputation: 103
Starting a new project in Next.js I have this folder structure
But when I navigate to localhost:3000 I get a 404 screen, so there is some issue with the routing, can't find any info on it online though.
Upvotes: 0
Views: 71
Reputation: 3726
Your folder structure looks like a mess. pages
shouldn't be inside the app directory.
Based on the name of the files you have, you are working with the pages router so move pages one level up and it should be good.
Take a look at https://nextjs.org/docs#app-router-vs-pages-router for more info on how to choose.
Upvotes: 2