TanStackT
TanStack2w ago
7 replies
skinny-azure

Pre-rendering when building Docker image

I'm having some trouble with the pre-rendering when building a Docker image. Everything works fine when building directly on my machine but when building the Docker image it fails because it can't connect to the server.

This is the error that I'm getting:

8.332 ➜ Listening on: http://localhost:43645/ (all interfaces)
8.835 [prerender] Concurrency: 10
8.836 [prerender] Crawling: /
8.839 [prerender] Prerendered 0 pages:
8.840 error: Unable to connect. Is the computer able to access the url?
8.840   path: "http://localhost:3000/",
8.840  errno: 0,
8.840   code: "ConnectionRefused"
8.840
8.840
8.840 Shutting down server in 3s... Server closed.
8.840
8.842 Bun v1.3.5 (Linux arm64)
8.889 error: script "build" exited with code 1


It looks like it's trying to connect on a port that is different from the one that the server is listening to but I'm not sure where it's getting the 3000 port from and why it's not using 43645 instead.

I'm using SPA mode with Nitro and Bun.

Any help appreciated!
Was this page helpful?