ReferenceError: is not defined: How to Fix It | SheCodes

Unknown name · Usually quick to fix

ReferenceError: is not defined

Your code is using a variable or function name that hasn’t been created yet.

What the error looks like

ReferenceError: process is not defined

Why it happens

The variable or function was never declared, it’s misspelled, or it’s defined in a different file and not imported.

How to fix it

  1. Check for typos in the variable name
  2. Make sure you’ve imported it if it’s from another file
  3. Check that the variable is declared before you use it

Ask your AI coding tool to fix it

Paste this prompt into Claude Code, Cursor, Bolt or Lovable, with your own error in place of the example.

I'm getting this error and I need help understanding and fixing it:

```
ReferenceError: process is not defined
```

Please:
1. Explain what this error means in plain English
2. Tell me the most likely cause
3. Give me the exact code changes or commands I need to fix it
4. Show me how to prevent this error in the future

Got a different error?

Paste any error into the free Error Decoder and get it explained in plain English, with a fix prompt.

Decode my error

More common errors explained