Next.js Discord

Discord Forum

Blank homepage??

Unanswered
.kevqn posted this in #help-forum
Open in Discord
Avatar
Hey there! I just need a quick help with this issue. I've been scratching my head for a while and it's honestly so confusing.
If you visit the homepage of my website (https://dtuarchive.vercel.app), you can see that the page loads for a second and then vanishes. I have no clue as to why this is happening. I googled the issue, some other people had it but the solutions there didn't work for me.
Github: https://github.com/kvqn/dtu-archive/tree/master/dtuarchive

11 Replies

Avatar
Earlier all the pages used to be in the pages/ directory but i wanted to slowly move to the app/ directory because it look interesting. For now only the homepage is in the app/ directory. Everything else works and is in the pages/ directory.

The homepage is a simple page.tsx file with some data fetching and rendering. No react interactivity and all that shit.

This is especially weird because it works fine in the the dev environment npm run dev but is blank in the production environment npm run build and npm run start
Avatar
Giant Chinchilla
@.kevqn any errors in the console?
Avatar
nope
I hope you visited the page and see what I'm talking about.
It's visible for a second and then vanishes.
Avatar
Alright so i made the home page in the pages/ directory and it works?
very weird behaviour.
Avatar
Giant Chinchilla
@.kevqn i think the app router shouldnt be in the src folder like you had it before, but im not sure
im on mobile rn, didnt see any other issue
Avatar
maybe.. but that doesn't explain why npm run dev was working 🤷‍♂️
imma mark this one has a one off unsolvable mystery.