Render Deploy "Build failed" / "Exited with status 1" in CI
Render ran your build/start commands and the deploy failed - the build exited non-zero, the service crashed before passing its health check, or a missing env var/wrong root directory broke the run.
What this error means
The Render deploy log ends with a build failure or the service repeatedly restarting and failing the health check. A real build/start error reproduces every run; a missing env var fails until it is added in the dashboard or render.yaml.
==> Build failed 😞
error Command failed with exit code 1.
# or
==> Service unhealthy: the service failed its health check on port 10000Common causes
Build or start command failed
The build command exited non-zero, or the start command crashes (wrong entrypoint, bad port). Render binds to PORT; not listening on it fails the health check.
Missing env var or wrong root directory
A required environment variable is not set in the Render service, or the root directory points at the wrong folder in a monorepo, so the build/run uses the wrong context.
How to fix it
Pin build/start, port, and env in render.yaml
Declare the commands, the port the app binds, and required env vars as infrastructure.
# render.yaml
services:
- type: web
name: api
rootDir: apps/api
buildCommand: npm ci && npm run build
startCommand: npm start
envVars:
- key: DATABASE_URL
sync: falseListen on $PORT and read the build log
- Bind the server to
process.env.PORTso Render’s health check reaches it. - Reproduce the build command locally to read the real error.
- Add missing env vars in the service settings (or
render.yaml) and redeploy.
How to prevent it
- Always bind to
$PORTand expose a health endpoint. - Declare build/start commands, root dir, and env vars in
render.yaml. - Run the build locally before pushing so failures surface early.