Getting 404 page , when running npm run dev,
Answered
Hierran Wolfdog posted this in #help-forum
Hierran WolfdogOP
browser console throwing " GET http://localhost:3000/ 404 "
project used to run perfectly, this suddenly started to happen , terminal logs
project used to run perfectly, this suddenly started to happen , terminal logs
- event compiled client and server successfully in 522 ms (20 modules)
- wait compiling...
- event compiled client and server successfully in 557 ms (20 modules)
- wait compiling /_error (client and server)...
- event compiled client and server successfully in 1292 ms (161 modules)
- warn Fast Refresh had to perform a full reload. Read more: https://nextjs.org/docs/messages/fast-refresh-reloadAnswered by Hierran Wolfdog
I believe that this issue is caused by the new shadcn Re-usable components project , here's the open issue on there repo https://github.com/shadcn/ui/issues/755 , thank you so much for the help @andrewscofield
10 Replies
This can happen for a variety of reasons. Try stopping your dev server and deleting the
.next folder and launch the dev server againHierran WolfdogOP
@andrewscofield Thanks for the quick replay , I'm sorry , I tried that and same issue , no changes
And its doing it for root url http://localhost:3000/ - not a page? Can you screenshot me your directory structure for your project?
Hierran WolfdogOP
Yes on the root URL , here's my directory
very strange. Do you have a middleware? That could also cause some issues here
Hierran WolfdogOP
No I'm not using any middleware , it's a really simple project at a super early stage , nothing that complicated
What bugs me that it was running great , and suddenly this happened
Sorry missed your reply. The running great and suddenly this thing is usually a bad build folder. Another possibility is that you're running rogue node.js processes in the background and don't even know it. Like you stopped dev server but its still running. You can open task manager and close each node.js instance... or just try rebooting.
Hierran WolfdogOP
I believe that this issue is caused by the new shadcn Re-usable components project , here's the open issue on there repo https://github.com/shadcn/ui/issues/755 , thank you so much for the help @andrewscofield
Answer
Oh, yea nice find! I can see you also have 2 app folders? Hope that you are able to get it fixed