ReferenceError: process is not defined
Diagnosis
The browser bundle reads a server-only variable.
Root cause
src/config.js reads process.env, which the browser bundle doesn't define.
Evidence
LOGReferenceError: process is not defined
2026-10-28T17:57:40Z
CODEprocess.env read in a browser bundle
Confidence: High
Files
- src/config.js
Suggested fix
Read the value from the build's public environment instead.
Read the API URL from the public environment
Removed: export const apiUrl = process.env.API_URL;Added: export const apiUrl = import.meta.env.PUBLIC_API_URL;