# `Error: Missing required environment variable: TOKENTIDE_API_KEY is undefined`

**Where it appears:** Terminal or Vercel runtime logs

**What it means:** Your app looked for an environment variable slot (such as an API key or database URL), and that slot wasn't set in the environment where the app is running.

## Likely causes

- The variable was added to `.env.local` on your computer, but not yet to Vercel's Environment Variables (or vice versa).
- The variable was added in Vercel after the last deployment, and the project hasn't been redeployed yet.

## Message for your agent

```text
The app says an environment variable is undefined. Run `npm run check-env` locally and `npx vercel env ls` online (names only, never values) to tell me which environment is missing it.
```

**Prevention:** Whenever you add a variable in Vercel, tick both Production and Preview, and keep `.env.example` updated.

---
Source: [Agentic Makers](https://agenticmakers.app/en/help/errors/missing-required-environment-variable-undefined) · License: CC BY 4.0
