You built an app with an AI tool, ran it, and the console says:
TypeError: Cannot read properties of undefined (reading 'VITE_SUPABASE_URL')
or your key is just undefined . This is the Vite version of the same problem as Next.js NEXT_PUBLIC_ variables, and it has a security side that matters for AI-built apps on proofforge.live's radar.
Why import.meta.env.X is undefined
The name does not start with VITE_ . Vite only exposes variables with that prefix to client code. SUPABASE_URL will never show up. Use VITE_SUPABASE_URL .
You used process.env in Vite code. Vite does not define it in the browser. Use import.meta.env .
The .env file is in the wrong folder. It belongs in the project root, next to vite.config , not in src .
You did not restart the dev server. Vite reads env files at startup.
The host has no value. .env is usually git-ignored, so Vercel, Netlify or Cloudflare never saw it. Add the variable in the host's settings, then redeploy.…