Troubleshooting builds and apps
The usual reasons a deployment fails, and how to fix them.
The build fails#
- Open the deployment and read the build log from the bottom up: the first error is usually a few lines above the end.
- Check that the build command works on your computer from a clean checkout (without your local
node_modulesor.env). - Variables the build needs must be available at build time for that environment.
- In a monorepo, make sure the project points at the app's folder (the root directory).
- If deployments stay queued, other builds of the team are running, or the team used its build minutes for this period.
The health check fails#
- The app must listen on
PORTand on all interfaces (0.0.0.0), not onlylocalhost, and answer on the health check path set in the project settings. - The start command must keep running: a command that exits stops the app.
- Read the runtime log of the deployment for crashes at start-up, such as a missing variable or a database that cannot be reached.
The app crashes or is slow#
Read the runtime logs and Project → Metrics. Memory near the limit causes restarts: choose a larger size in Project → Settings if your plan allows it.
The domain does not work#
The domain page shows which DNS record is missing or wrong. Remove old A/AAAA records pointing elsewhere, and wait for DNS to update before checking again. Domains from other registrars need Pro or Team.
Something is refused with "upgrade"#
The team reached a limit of its billing owner's plan. Usage & billing shows which one.
Still stuck?#
Contact support with the deployment ID.