Search code examples
next.jsreplit

Nextjs white screen running project on Replit


When I run a Next.js project on Replit, it just shows up as a white screen. This bug affects not just me, but many people.

I'm importing the project from Github, not using the official Nextjs template (which does work fine)


Solution

  • Next.js has a bit weird system which breaks Replit's port detection, to fix this add this section in your .replit config file.

    [[ports]]
    localPort = 3000
    externalPort = 80