IT Error Decoder

How to Fix Environment Variable references Secret which does not exist

Error message

Environment Variable "<NAME>" references Secret "<secret>", which does not exist.

If you're seeing "Environment Variable references Secret which does not exist", you're not alone. Here's what it means, why it happens, and the steps to resolve it.

What this error means

A Vercel environment variable is configured to read from a named Secret, but no Secret with that name exists in your Vercel team.

Why this happens

The Secret was deleted, never created, or only exists in a different scope/team than the project.

Step-by-step fix

  1. In Vercel: Project → Settings → Environment Variables. Find the variable and check what it references.

  2. Replace the secret reference with a plain value, or create the missing Secret at the team level.

  3. Redeploy the affected environment (Production / Preview / Development).

Affected products

Vercel

Still broken? Try these

  • Confirm the variable exists for the environment you're deploying to (Production vs Preview).
  • If you migrated from `vercel secrets`, note that Secrets have been deprecated for project-level variables in newer flows.
  • Use `vercel env ls` from the CLI to see what's actually configured.

Related errors

Frequently asked questions

What does "Environment Variable references Secret which does not exist" mean?

A Vercel environment variable is configured to read from a named Secret, but no Secret with that name exists in your Vercel team.

What causes "Environment Variable references Secret which does not exist"?

The Secret was deleted, never created, or only exists in a different scope/team than the project.

How do I fix "Environment Variable references Secret which does not exist"?

1. In Vercel: Project → Settings → Environment Variables. Find the variable and check what it references. 2. Replace the secret reference with a plain value, or create the missing Secret at the team level. 3. Redeploy the affected environment (Production / Preview / Development). Always test changes in a non-production environment first.

Browse more errors in Vercel: Fix Vercel deployment errors. Build failures, missing output directories, exceeded build duration, missing env vars, and module resolution issues. Or paste your own error into the error decoder tool to find a match. You can also go back to the homepage to browse common errors by topic.