JavaScript Error Codes
JavaScript errors explained in plain English. Find your error below.
Error Codes
is not a function
JavaScript
Programming Language
This error means JavaScript found the variable you referenced, but it is not a …
is not defined
JavaScript
Programming Language
This error means JavaScript encountered a name it has never heard of.
The …
Cannot assign to read only property
JavaScript
Programming Language
This error means you tried to change a property that JavaScript has been told …
Cannot read properties of null
JavaScript
Programming Language
This error means you tried to access a property or method on a variable that is …
Cannot read properties of undefined
JavaScript
Programming Language
This error means you tried to access a property or method on a variable that is …
Cannot use import statement outside a module
JavaScript
Programming Language
This error means you used the import keyword, but JavaScript is not treating …
CORS error
JavaScript
Programming Language
CORS stands for Cross-Origin Resource Sharing.
When your webpage tries to …
Failed to fetch
JavaScript
Programming Language
This error appears when JavaScript's fetch() function tried to make a network …
Invalid or unexpected token
JavaScript
Programming Language
This error means JavaScript found a character in your code that it does not …
Maximum call stack size exceeded
JavaScript
Programming Language
This error means a function kept calling itself (or a chain of functions kept …
Out of memory
JavaScript
Programming Language
An out of memory error means JavaScript tried to allocate more memory than the …
Uncaught Promise rejection
JavaScript
Programming Language
This warning means a Promise failed (was rejected) but no code was in place to …
Unexpected end of input
JavaScript
Programming Language
This error means JavaScript reached the end of your code file while still …
Unexpected token
JavaScript
Programming Language
An 'Unexpected token' error means JavaScript found a character or symbol it did …
Assignment to constant variable
JavaScript
Programming Language
This error means you tried to change the value of a variable declared with …
Cannot set properties of null
JavaScript
Programming Language
This error means you tried to set a property on a variable that is null — …
Cannot set properties of undefined
JavaScript
Programming Language
This error means you tried to set a property on a variable that is undefined. …
Cannot set property (getter-only)
JavaScript
Programming Language
This error means you tried to assign a value to a property that is read-only — …
EvalError
JavaScript
Programming Language
An EvalError is related to the eval() function in JavaScript.
In modern …
Illegal invocation
JavaScript
Programming Language
Illegal invocation means you called a function but the 'this' context inside …
Missing formal parameter
JavaScript
Programming Language
Missing formal parameter is a SyntaxError that means your function definition …
RangeError
JavaScript
Programming Language
A RangeError means a value is outside the allowed range for a particular …
Reduce of empty array with no initial value
JavaScript
Programming Language
This error happens when you call .reduce() on an empty array without providing a …
ReferenceError
JavaScript
Programming Language
A ReferenceError means you are trying to use a variable that JavaScript cannot …
SyntaxError
JavaScript
Programming Language
A SyntaxError means JavaScript cannot understand your code because something is …
TypeError
JavaScript
Programming Language
A TypeError means JavaScript tried to do something with a value that is the …
URIError
JavaScript
Programming Language
A URIError means you passed an invalid web address (URI) to one of JavaScript's …
X is not iterable
JavaScript
Programming Language
This error means you tried to loop over something that cannot be looped over. …