Manoj Sethi
Manoj Sethi

Reputation: 2038

NextJS White Screen on pages with getServerSideProps when URL Put in Browser Directly

I am using Next 13 and I am facing issue when production build only. Basically site works fine but when I try to open a page by URL typing in browser it shows empty page or white screen. Upon checking the browser console I see a keyword undefined being appended to all of the asset files.

This is only happening to pages in which getServerSideProps is implemented. I have checked and put try catch in the getServerSideProps as well to return default props.

enter image description here

Upvotes: 0

Views: 588

Answers (1)

Manoj Sethi
Manoj Sethi

Reputation: 2038

To anyone who stumbles upon this question. I don't know what has happened but creating a new project and copying my files into that solved it for me. No logic changed.

Upvotes: 0

Related Questions