adrianhajdin / stack_overflow_nextjs14

Ultimate Next.js 14 Course

Home Page:https://devflow-rose.vercel.app/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

layout.tsx collision

Owais-Eltigani opened this issue · comments

Hello @adrianhajdin, I've been following your ultimate nextjs course and so far so good but it seems there is an issue in the layout.tsx in the app folder and the layout.tsx in the (root) folder. when I start debugging my project it render the app layout.tsx elemnts correctly then it gives me error 404 this page couldn't be found for the (root ) layout.tsx ,however, when I navigate to another path like http://localhost:3000/ask-question it work fine and both layouts are shown correctly and their children too. moreover I started experimenting when I change the name of the (root)/layout.tsx -> (root)/page.tsx the error goes away but I lose the ability to access the children in that folder.

I'm on next 14.2.3 I tried to downgrad to your version in the project but didn't work tried to search and read docs and ask chatgpt but nothing seems to work.