We build our production env via GitHub Actions.
Your docs mention that framework envs are injected into the build environment.
This used to work, but it doesn’t anymore. My build in a nutshell:
pnpm vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
pnpm vercel build --target=production --token=${{ secrets.VERCEL_TOKEN }}
pnpm vercel deploy --prebuilt --target=production --token=${{ secrets.VERCEL_TOKEN }}
If I export the environment variables in the build step I don’t see any of the VERCEL_ environment variables mentioned in the docs.
Did something change recently?
anshumanb
(Anshuman Bhardwaj)
November 4, 2025, 6:43am
3
Hi @leonardofaria ,I think this would be the correct explanation here:
Hi @followbl ,
Pulling down local VERCEL_ environment variables for local development was removed because customers would sometimes edit these values locally and find themselves in confusing situations. These prefix variables are intended to only exist once code is deployed to the platform or when running a local environment intended to simulate the platform with vercel dev.
If you run vercel dev, environment variables that are knowable at local runtime should be available as part of the runnin…
1 Like
When did this change happen? Investigating things on my side and the date would be relevant. Thank you
anshumanb
(Anshuman Bhardwaj)
November 6, 2025, 5:16am
5
I have this constant to detect the domain of my app, supporting multiple envs (local, preview, production and an alternative production env) and I only noticed a problem last week:
export const BASE_URL =
// eslint-disable-next-line no-nested-ternary -- .
!process.env.NEXT_PUBLIC_VERCEL_ENV ||
process.env.NEXT_PUBLIC_VERCEL_ENV === 'development'
? (process.env.NEXT_PUBLIC_URL ?? 'http://localhost:3000')
: process.env.NEXT_PUBLIC_VERCEL_ENV === 'preview'
? `https://${process.env.NEXT_PUBLIC_VERCEL_URL}`
: `https://${process.env.NEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URL}`;
I was able to fix this in my CI pipeline by setting the PUBLIC_URL:
export NEXT_PUBLIC_URL="https://app.domain.com"
This is no longer a problem, I was just curious because I’ve been using v44.7.3 for a while, so this timeline is weird, but not weird enough to keep investigating.
Thanks!