Next.js Discord

Discord Forum

prerendering error when i making a build using docker.

Unanswered
Raspberry Horntail posted this in #help-forum
Open in Discord
Raspberry HorntailOP
I get the error attached in the image.
when i make the build of the frontend without docker and my backend is up it builds perfectly - i used http://localhost to comunicate to the backend
-but when i run both on docker it gave error in build , i also try to first up the docker of backend and then up the frontend docker it again failed
- when i run in development mode npm run dev it able to fetch with http://backend - both run on docker

i don't know but is happening is it failed because i use docker of something i don't know i used server side rendering in my project

2 Replies

European sprat
As far as the docker container is concerned, http://backend doesn't exist. It works in dev because you probably your host probably has a hosts file entry for backend --> localhost
Raspberry HorntailOP
so what i should add