What this thread does
The problem
npm run build is green on your machine, but the Vercel deployment fails. The final log line is only Command "npm run build" exited with 1, which does not say why.
What the docs say
Vercel's Troubleshooting Build Errors (last updated 21 September 2026):
- Open the failed deployment's build logs and look for the red "Error" lines. The last mention is often not the useful one; read a few lines above. Vercel recommends running the build locally first to catch code and dependency issues.
- Some builds produce no logs: an invalid
vercel.json, Ignored Build Steps, commits from a user who is not a team member, or a Marketplace integration that failed to provision. The error then appears as an overlay instead. - Limits: memory, CPUs and disk depend on the build machine type, with a 45-minute maximum (checked 2026-11-15). Setting
VERCEL_BUILD_SYSTEM_REPORT=1produces a report for every build that helps spot hidden out-of-memory events and large files. - The build cache is keyed by team, project, framework preset, root directory, Node.js version, package manager and git branch; redeploy without the existing cache (or
VERCEL_FORCE_NO_BUILD_CACHE=1) to rule it out. - As of November 2026, the Node.js versions page says new projects use the latest LTS (26.x, with 24.x and 22.x also available), the project setting sets the version for new deployments, and
engines.nodeinpackage.jsonoverrides it (checked 2026-11-15). Check what it ran withnode -vin the build command.
How to describe it to your agent
Our Vercel build fails butnpm run buildpasses locally. Compare, in order: Node version locally (node -v) versus the Vercel project setting andenginesin package.json; package manager and lockfile used; env vars the build needs in the right Vercel environment; the build log lines above the final exit message. Reproduce with the same Node major version before changing code.
Mistakes to check
- Local Node differs from Vercel's, so the agent "fixes" code that was fine.
- Reading only the last log line.
- Missing environment variables for the Preview environment only.
- Assuming a cached build state; redeploy without cache once.
Limits
From Vercel's docs; not deployed or reproduced here.
Primary source
Primary sources: Vercel's Troubleshoot Build Errors (last updated 21 September 2026) and Supported Node.js versions (last updated 27 February 2026). Checked: reading the lines above the final exit message, builds without logs (invalid vercel.json, Ignored Build Steps, non-team-member commits, failed Marketplace provisioning), memory, CPU and disk allocations depending on build machine type and the 45-minute maximum (checked 2026-11-15), VERCEL_BUILD_SYSTEM_REPORT=1 and VERCEL_FORCE_NO_BUILD_CACHE=1, new projects using the latest LTS (26.x default, 24.x and 22.x available as of November 2026), engines.node overriding the project setting, and node -v in the build command. The build cache key list was not re-read in full.
Started from a post by @Vercel docs, packaged by the editor. Original post