[Bug] Frontend code references process.env instead of Vite import.meta.env #2
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Client-side code in
frontend/src/services/api.ts,frontend/src/features/auth/LoginView.tsx, andfrontend/src/features/auth/CallbackView.tsxuses Node'sprocess.env.VITE_*rather than Vite's standardimport.meta.env.VITE_*.Impact
tscfails withTS2580: Cannot find name 'process'because@types/nodeis not installed.processis undefined in browser environments, throwing runtimeReferenceError: process is not defined.src/vite-env.d.tsprevents IDE and TypeScript type-checking for Vite client variables.Expected Behavior
import.meta.env.VITE_*.src/vite-env.d.tsshould declareImportMetaEnvand referencevite/client.