GUIDES · BUILD CONFIGURATION

Invalid vercel.json on Vercel: diagnose schema and routing errors

A malformed or unsupported vercel.json can block deployment. Validate configuration keys, rewrites, cron schedules and framework settings before pushing.

Find the first configuration error

Vercel reads vercel.json at the configured project root. A JSON parse error, unsupported field value or invalid routing rule can reject a deployment before app code is executed. Read the first relevant validation error in the build or deployment logs.

JSON is stricter than JavaScript: comments and trailing commas are not valid. A copied JavaScript object literal is not automatically valid JSON.

Use the published schema

Vercel publishes a JSON schema for static project configuration. Add its $schema property to vercel.json for editor validation, and use the documented framework slug, outputDirectory and rewrite forms rather than inventing keys.

Root Directory is configured in Vercel Project Settings rather than in vercel.json.

{
  "$schema": "https://openapi.vercel.sh/vercel.json",
  "framework": "nextjs"
}

Check routing intent

An overly broad rewrite can shadow static assets or intended application routes. Rewrites preserve the displayed URL; redirects send the browser to a different URL. Choose the appropriate mechanism for your intended behavior.

For Vercel Cron Jobs, review plan restrictions and schedule syntax before enabling multiple triggers. A syntactically valid configuration can still be unsupported on the current plan.

Validate then deploy

Check the JSON syntax locally, compare properties against the official schema and run a preview build. If the project has dashboard overrides, inspect those settings too. The safest fix is a narrow correction, not deleting the whole configuration.

Reference: Vercel Static Configuration with vercel.json documentation. DeployDoctor reads vercel.json to identify several configuration hazards.

Updated 2026-10-21