Vercel / deployment triage

Preview works. Production fails.

The fastest path is to compare the exact deployment and runtime inputs, in order. A preview URL proves one environment worked; it does not prove the production alias uses the same commit, variables, domain, or data.

1. Name the two deployments

Open the deployment that worked and the production deployment that failed. Record the commit SHA, build command, framework version, output directory, and deployment URL. Do not compare a local build with a current production build and assume they are equivalent.

  1. Is the production alias pointing at the deployment you expect?
  2. Did the production build pass with the same lockfile?
  3. Did a rewrite, middleware rule, or custom domain change the request path?

2. Compare environment variables by environment

Vercel environment variables are scoped. A value present in Preview may be missing or different in Production. Check names, presence, and whether a variable is exposed to browser code. Never paste secret values into a ticket or diagnostic form; compare a redacted key list instead.

# safe comparison in a local shell: names only
vercel env ls
vercel env pull .env.preview --environment=preview
vercel env pull .env.production --environment=production
comm -3 <(sed 's/=.*//' .env.preview | sort) \
        <(sed 's/=.*//' .env.production | sort)

3. Use runtime evidence, then reproduce

Read the production function or browser console logs around one fresh request. Look for a missing variable, a server-only module imported into client code, a case-sensitive path, a blocked origin, or a database record that exists only in preview. Reproduce with the exact production URL and a clean browser session.

Use DebugSmith

Have the production URL and build log?

DebugSmith can inspect a public URL’s initial response and organize the evidence into a reviewable repair plan. It does not access private deployments or change Vercel settings.

Check a public URL

Further reading: Vercel deployments, Vercel environment variables, and Vercel runtime logs.