Error AtlasError Documentation and Resolution

JavaScript variable or symbol is not defined

ReferenceError: "x" is not defined

JavaScript tried to use a variable, function, or imported name that does not exist in the current scope.

ReferenceError: x is not definedruntime
ReferenceError: "x" is not defined
  • The symbol was never declared or imported.
  • A script or module load order issue means the value is used too early.
  • A typo or refactor changed the variable or function name.
  1. Check spelling and confirm the symbol is declared or imported in scope.
  2. Verify scripts, modules, and dependencies load before the symbol is used.
  3. Use linters or types to catch missing references earlier.
MDN: ReferenceError: x is not defined
JavaScript x is not defined: causes and fixes | Error Atlas