Open the failed deployment in Vercel and read its build logs. Scroll up from the bottom to the first real error: that's the cause, and everything after it is fallout. Most failures are the build command failing (a type error, a failing test, a missing package), an environment variable the build needs that isn't set in Vercel, or a configuration problem. If a build fails with no logs at all, Vercel found a problem before the build could start, such as an invalid vercel.json.
What's the problem
A push or deploy shows "Deployment failed", "Build failed" or "Command exited with 1", and the site stays on the previous version.
Why it happens
- The build command fails: TypeScript or lint errors, a failing test, a missing dependency.
- A missing environment variable that the build reads.
- It builds on your computer but not on Vercel: different Node.js version, a package only installed locally, or case-sensitive file names.
- Invalid configuration, such as a broken
vercel.json, so the build never starts. - Out of memory or time during a large build.
How to fix it
- Open the deployment's page in Vercel and read the build logs from the first error.
- Run the same build command locally (usually
npm run build) from a clean install (npm ci) to reproduce it. - Check environment variables in the project settings for the environment being deployed.
- Match the Node.js version in Vercel's settings to the one you use locally.
- If there are no logs, check
vercel.jsonand project settings for mistakes. - Roll back to the last good deployment while you fix it, if production is affected.
What Preventionlabs checks
One click runs the full report on your domain. For this problem it shows whether your site loads, how fast, and where its redirects go. With Cloudflare connected, it also shows recent deploys and account changes, with their times. It has no connection to your host, so check the host's status page and logs as well.
Run your free reportYour first report is free, no card needed. Then A$50 a month, up to 10 domains. Read-only: it never changes anything.
Sources
- Vercel: Troubleshooting Build Errorsofficial docs
Build logs - the console output when your deployment is building which can be found under the Deployment Status section of the Project's Deployment page.
- Vercel: Troubleshooting Build Errorsofficial docs
Builds can fail without providing any build logs when Vercel detects a missing precondition that prevents a build from starting.
Preventionlabs is independent and not affiliated with Vercel. Product names are used only to describe the problem.
← All of Hosting