I have a NextJS project hosted on Vercel. In one of the client side React components I console.log process.env.NEXT_PUBLIC_VERCEL_ENV and always get undefined (on dev / preview).
From my understanding NEXT_PUBLIC_VERCEL_ENV shouldn't have to be set in .env.local but automatically be available? (as per: https://vercel.com/docs/projects/environment-variables/system-environment-variables).
My Framework Preset is set to Next.js. I have "Automatically expose System Environment Variables" checked in Project Settings > Environment Variables.
Anyone got an idea why?