JavaScript Error Reference
Common JavaScript errors explained with causes, fixes, and code examples
Core Errors
Standard JavaScript Error types defined in the ECMAScript specification.
TypeError is thrown when an operation could not be performed, typically when a value is not of the expected type. This includes calling non-functions, accessing properties of null/undefined, and using operators on incompatible types.
ReferenceError is thrown when code references a variable that doesn't exist in the current scope. This happens when using a variable before it's declared, or when the variable name is misspelled.
SyntaxError is thrown when the JavaScript engine encounters code that doesn't conform to the language syntax. This is caught at parse time, before the code executes.
RangeError is thrown when a value is not in the expected range. This includes invalid array lengths, exceeding the maximum call stack size, and passing out-of-range numbers to methods.
URIError is thrown when a global URI handling function (encodeURI, decodeURI, encodeURIComponent, decodeURIComponent) is given a malformed URI or the string to decode contains invalid percent-encoding sequences.
EvalError historically indicated errors related to the eval() function. While modern JavaScript engines no longer throw EvalError, it still exists in the language for backward compatibility. The constructor can be used to create custom instances.
Runtime Errors
Common runtime errors and engine-specific exceptions you'll encounter in JavaScript applications.
InternalError is a non-standard error thrown when the JavaScript engine encounters an internal issue. The most common case is "too much recursion" in Firefox. Note that this is not available in all browsers — Chrome uses RangeError for similar conditions.
An Unhandled Promise Rejection occurs when a Promise is rejected and there is no .catch() handler or try/catch around an await. In Node.js, this can terminate the process. In browsers, it triggers the unhandledrejection event.
"Maximum call stack size exceeded" is a RangeError thrown when the call stack exceeds the engine's limit, almost always caused by infinite or excessively deep recursion. Each function call adds a frame to the stack, and when the limit is reached, this error is thrown.
"Cannot read properties of undefined (reading 'x')" is the most common TypeError in JavaScript. It occurs when you try to access a property or call a method on a value that is undefined or null.
Track all these errors automatically
Checkend captures JavaScript errors with full context—stack traces, request data, and more. Self-hosted, so your error data stays on your servers.