Next.js Discord

Discord Forum

routes return 404 not found error in next.js

Unanswered
Mallow bee posted this in #help-forum
Open in Discord
Mallow beeOP
i created a route in a next.js application called home.js inside a directory called pages with some code in it but when i tried to navigate to it by typing ''http://localhost:3000/pages/home" in the url bar in the browser, it returns the error page with warning message '404 | page could not be found'. I am seeking help from experts. Thank you.

14 Replies

Mallow beeOP
this is the remote repo if you want to see the whole image and clone it: https://github.com/Alharith-Albayati/test.git
repo is private
@joulev repo is private
Mallow beeOP
I made it public now
not seeing it in the reproduction repo
Mallow beeOP
hold on
Mallow beeOP
which branch
Mallow beeOP
noor
rename your app/pages/home/home.js to app/pages/home/page.js
Mallow beeOP
it does not work again
Shhh just read the routing documentation, https://nextjs.org/docs/app/building-your-application/routing
Mallow beeOP
I already read it but it does not work.. the problem started after I read it. Thank for helping anyway (: