500 Internal Server Error with NextJS

PLEASE help us help you by writing a good post!

So I have deployed my site, it’s built with NextJS, MongoDB and Firebase. The link as it stands returns a 500 error. If I navigate to the login page https://readmedev.netlify.app/login it then works perfectly fine and I can navigate to ‘home’ which is https://readmedev.netlify.app/ but as soon as I refresh, it goes back to 500 again.
I assume it is to do with client-side routing and server-side rendering but I have no idea how to fix it.

It’s this: Server.edge not defined Error on nextJS SSR functions cause site to return 500 Errors

TL;DR: No solution yet

Ah damn okay thank you - Is this something being worked on? Or any possible workaround? I see “Their workaround solution is to add a __next_private_prebundled_react env variable” but might not work for everyone?

It’s being worke on, but would take some time. No known workarounds at the moment. Some folks were able to get this working using some scripts, not sure if it’s still relevant. That environment variable would definitely not work though.

Okay thank you, I’ve temporarily deployed on Vercel which works. Once fixed here, I’ll deploy it, thanks for your help.

Any updates on this issue?
I have been using Netlify to deploy my NextJS site without issues earlier today, but when I checked on it this evening, it was giving me the Internal Server Error.

No updates so far. We will post an update when there’s one.