"npm run dev" displays a 404 page for all routes? #55409
Unanswered
akhandafm17
asked this question in
Help
Replies: 1 comment
-
Im using Vite. It happened the same to me. I restarted the server in my terminal by doing this shorcuts: Then I went to the browser and I reload the page cleaning the cache several times. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
I'm encountering an issue where running npm run dev displays a 404 page for all routes in my Next.js 13 application. I suspect the problem originated when I was clicking on the sign-out button for the first time after adding the feature using next-auth. Interestingly, the terminal doesn't provide any errors, leaving me puzzled about the root cause.
To troubleshoot, I've tried the following:
Running npm run build && npm start and just npm start, but the problem persists.
Deleting the .next folder and running npm install again, but this didn't resolve the issue either.
this is the code of my navbar
and in this code, I have put a sign-out button.
also, the console gives me this error every 3 seconds:

this is the layout file:
Additional information
No response
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions