Env Variables set on Install/Build Steps, calling the function does not contain

Hi hi! I’m using a Go Serverless function on Vercel with env vars, and hitting an issue fetching them at runtime.

  • The env var is set and shows up during build/install:

I have this open repository showing how and when we’re getting the variables.

Runtime log when hitting the endpoint:

2025/12/18 12:41:43 Failed to load environment variable: TEST_ENV_VAR is not set

Any pointers on why the env isn’t available at runtime (even though it’s present in build/install)?
Would be super appreciated!!

I’m also experiencing environment variables (both those I set and Vercel system variables) not being set at runtime.

What does your Environment Variables look like in your Project Settings?

Hi!

Runtime env vars not showing up after build is a really common gotcha. I built a CLI that catches these misconfigurations before you deploy npx safelaunch scan checks for missing vars, empty values, and build vs runtime mismatches. Worth trying before your next deploy.