GatsbyJS - How can I solve the "net::ERR_CONNECTION_REFUSED" of GatsbyJS? GatsbyJS - How can I solve the "net::ERR_CONNECTION_REFUSED" of GatsbyJS? docker docker

GatsbyJS - How can I solve the "net::ERR_CONNECTION_REFUSED" of GatsbyJS?


The socket connection only appears during the development stage (gatsby develop) and it's intended to refresh and update the browser on each saves by hot-reloading, so without losing component state. This feature is known as fast-refresh.

As I said, and for obvious reasons, this only applies in gatsby develop. Under gatsby build, there's no connection socket. If your Docker development environment is sharing the port 8000 and 8001 (according to your docker-compose.yml setup), once built, can cause a break of the socket because it has changed the scope of the project.

Answering, you don't have to worry about, your project seems to build properly but, because of the sharing port between environments it prompts the log.

Further readings: