#51 most commonenv/configLovableBolt.newCursorWindsurf

Uncaught ReferenceError: process is not defined (Vite)

Uncaught ReferenceError: process is not defined

Got a slightly different error? Paste the exact message and get a fix prompt tailored to it.

Paste your error →

What it means

The code uses a Node-style way of reading settings (process.env) inside a Vite browser app, which doesn't support it. Vite has its own way.

How to fix it: paste this prompt into your AI builder

Fix prompt for Lovable, Bolt, Cursor, Windsurf
My Vite app throws "process is not defined". Replace process.env.X usages in browser code with import.meta.env.VITE_X (renaming the variables with the VITE_ prefix in .env), keep server-only code untouched, and if a third-party library needs process, add a minimal define in vite.config. Don't change unrelated code.

If the AI can't fix it: manual steps

  1. After renaming variables, update them in your host's settings too and redeploy.

Where this happens

Seen in these AI app builders and editors:

LovableBolt.newCursorWindsurf

Sources

Related env/config errors

Still stuck? Paste your full error and UnstuckMyVibe will match it and hand you the exact fix prompt.

Fix my error →