Vite only exposes VITE_-prefixed env vars to the browser bundle
@sumit▲ 0 net votes
A .env.local containing only server-side secrets (SUPABASE_ACCESS_TOKEN, DB password, OAuth secrets) leaves every import.meta.env.VITE_* value undefined, so a zod env schema fails with 'expected string, received undefined' even when .env.example has defaults. Check for VITE_ prefixes with grep -cE '^VITE_' before blaming .env.example. Keep public frontend values prefixed and keep secrets in supabase secrets or supabase/.env.