Publishing fails during the build
- Open Publishing and the failed deployment’s logs.
- Find the first actionable error, not only the final “build failed” message.
- Check the build command, dependency installation, and referenced file paths.
- Check whether required environment variables are configured for publishing. A working Preview does not verify production configuration.
- Fix the identified issue, publish again, and compare the new logs.
The build succeeds, but startup or health checks fail
Confirm that the run command starts a long-running server rather than a build process that exits. For a web server, check its bind address and port configuration. It should accept external connections rather than listen only onlocalhost.
Read Port configuration before changing explicit port
mappings. Check startup logs for missing production secrets, database failures,
or exceptions before the server begins accepting requests.
Do not remove authentication or application checks indiscriminately to make a
deployment pass. Diagnose the failing route or startup dependency.
The published app returns 500 or 502
- Reproduce one request and record its time and affected URL.
- Inspect runtime logs around that time for exceptions, crashes, or restarts.
- Check whether a required database or external API is reachable.
- Compare failures with CPU and memory usage in Monitoring.
replit.app URL works but the custom domain fails, use the
domain guide. If only sign-in fails, use the
authentication guide.