All guidesErrors by provider
On this page

Error index

Vercel errors: exact messages and their fixes

This page lists the 12 Vercel error messages this site has a fix page for: the exact text, the cause in one line, and a link to the fix.

Use this from your agent

  • Claude Code: 4 read-only tools; cannot see your repo.
    claude mcp add --transport http viberaven https://viberaven.dev/mcp
  • Codex: same server, in ~/.codex/config.toml.
    [mcp_servers.viberaven]
    url = "https://viberaven.dev/mcp"
  • In your repo: writes Vercel + Supabase check rules for your agent (what it writes).
    npx -y viberaven init

12 errors

Vercel error messages, A to Z

  • DEPLOYMENT_NOT_FOUND

    Vercel returns 404 DEPLOYMENT_NOT_FOUND when no deployment answers that URL: a typo, a deleted preview, or a domain not added to the project. Check the URL.

  • ERR_PNPM_OUTDATED_LOCKFILE

    Vercel builds with CI=1, so pnpm refuses a pnpm-lock.yaml that no longer matches package.json. Run pnpm install locally and commit it with package.json.

  • Failed to parse private key: Error: Invalid PEM formatted message.

    firebase-admin throws it when the private key env var holds literal \n instead of line breaks, as pasted from the JSON. Replace \\n with \n where you read it.

  • Firebase: Error (auth/unauthorized-domain).

    Firebase throws auth/unauthorized-domain when the page host is not in Authorized domains. Add the Vercel host in the Firebase console; previews need theirs.

  • FUNCTION_INVOCATION_FAILED

    "This Serverless Function has crashed" (500 FUNCTION_INVOCATION_FAILED): read the first error in the Logs tab. Often an env var is unset for that environment.

  • FUNCTION_INVOCATION_TIMEOUT

    A Vercel function that runs past its max duration returns 504 FUNCTION_INVOCATION_TIMEOUT. The limit on each plan, how to raise maxDuration, and when to stream.

  • Invalid origin

    Better Auth answers 403 Invalid origin when the Origin is not in trustedOrigins. Add your preview URL pattern, scoped to your project, not *.vercel.app.

  • Max client connections reached

    On Vercel, connect to Supabase through the transaction pooler on port 6543, not the 5432 session pooler; set prepare: false (pgbouncer=true in Prisma).

  • MIDDLEWARE_INVOCATION_FAILED

    Vercel returns 500 MIDDLEWARE_INVOCATION_FAILED when middleware.ts or proxy.ts throws, often a client made from a missing env var. Read the runtime log first.

  • [next-auth][error][NO_SECRET]

    NextAuth stops in production without a secret: set AUTH_SECRET or NEXTAUTH_SECRET in Vercel and redeploy. On Vercel you need no NEXTAUTH_URL or AUTH_TRUST_HOST.

  • Node.js Version "20.x" is discontinued and must be upgraded

    Vercel stopped building with Node.js 20 on 2026-10-01. Change engines.node in package.json, or the Project Settings version, to 24.x or 22.x, then redeploy.

  • remaining connection slots are reserved for roles with the SUPERUSER attribute

    Neon refuses direct connections (53300) once max_connections fills, often from Vercel functions. Use the -pooler host in DATABASE_URL, one pool per instance.

How to use it

How to use this index

Look for the text your app, build log or browser console printed, without the parts that change between projects: table names, IDs, routes and URLs. The list is sorted by that text.

Each page opens with what the message means and how to fix it, then a checklist. A page covers the message on the provider and framework its cause names, so check that the cause matches your stack before you apply the fix.

Supabase errors · Next.js errors · Stripe errors · All provider errors