Error map

await outside async SyntaxError: await is only valid in async functions and the top level bodies of modules

JavaScript · layer 1, On your device

Open the full error page →

Centre: this error. First ring: errors it is linked with (12). Outer ring: what those are linked with. Colours show the layer of a request each error belongs to. Click any dot to re-centre the map on it; hover to follow its connections. The centre dot opens the error page.

await outside async — SyntaxError: await is only valid in async functions and the top level bodies of modules (JavaScript)await outsi…TS1128: Declaration or statement expected — TypeScript: error TS1128: Declaration or statement expected. (TypeScript)TS1128: Declaration…UnhandledPromiseRejection — Node.js: [UnhandledPromiseRejection] — This error originated either by throwing inside of an async function without a catch block (Node.js)UnhandledPromiseRej…body already used — TypeError: Failed to execute 'json' on 'Response': body stream already read (JavaScript)body already usedunknown instruction — Dockerfile parse error line N: unknown instruction (Docker)unknown instructionIndentationError — IndentationError: unexpected indent / expected an indented block (Python)IndentationErroralready declared — SyntaxError: Identifier 'x' has already been declared (JavaScript)already declaredEvent loop is closed — RuntimeError: Event loop is closed (Python)Event loop is closednot wrapped in act — Warning: An update to Component inside a test was not wrapped in act(...) (React)not wrapped in actAbortError — AbortError: The user aborted a request. / signal is aborted without reason (JavaScript)AbortErrorLooking up a deactivated widget's ancestor is unsafe — Flutter: Looking up a deactivated widget's ancestor is unsafe. At this point the state of the widget's element tree is no longer stable (Flutter / Dart)Looking up a deacti…Unexpected token < — SyntaxError: Unexpected token '<' (HTML served instead of JavaScript) (JavaScript)Unexpected token <missing ) — SyntaxError: missing ) after argument list (JavaScript)missing )unexpected end of input — SyntaxError: Unexpected end of input (JavaScript)unexpected end of i…unexpected identifier — SyntaxError: Unexpected identifier (JavaScript)unexpected identifi…invalid token — SyntaxError: Invalid or unexpected token (JavaScript)invalid tokenECONNREFUSED — Error: connect ECONNREFUSED 127.0.0.1:5432 (Node.js)ECONNREFUSEDFailed to fetch — TypeError: Failed to fetch / NetworkError when attempting to fetch resource (JavaScript)Failed to fetchERR_REQUIRE_ESM — Error [ERR_REQUIRE_ESM]: require() of ES Module not supported (Node.js)ERR_REQUIRE_ESMSocketException reset — java.net.SocketException: Connection reset (Java)SocketException res…reduce empty — TypeError: Reduce of empty array with no initial value (JavaScript)reduce emptyinvalid array length — RangeError: Invalid array length (JavaScript)invalid array lengthParse error — PHP Parse error: syntax error, unexpected … (PHP)Parse errorELIFECYCLE — npm ERR! code ELIFECYCLE / Command failed with exit code 1 (npm)ELIFECYCLEgyp ERR! — gyp ERR! build error / node-gyp rebuild failed (npm)gyp ERR!NameError — NameError: name 'x' is not defined (Python)NameErrorcompose validation — docker compose: services.x Additional property y is not allowed / yaml: line N: mapping values are not allowed (Docker)compose validationinvalid regex — SyntaxError: Invalid regular expression: /x/: Unterminated group (JavaScript)invalid regexReferenceError — ReferenceError: x is not defined (JavaScript)ReferenceErrorTDZ — ReferenceError: Cannot access 'x' before initialization (JavaScript)TDZSyntaxError — SyntaxError: invalid syntax (Python)SyntaxErrorTypeError arguments — TypeError: f() takes 1 positional argument but 2 were given (Python)TypeError argumentsTypeError missing arg — TypeError: f() missing 1 required positional argument: 'x' (Python)TypeError missing a…IndexError — IndexError: list index out of range (Python)IndexErrornever awaited — RuntimeWarning: coroutine 'fetch' was never awaited (Python)never awaitedvalidateDOMNesting — Warning: validateDOMNesting(...): <div> cannot appear as a descendant of <p>. (React)validateDOMNestinguseNavigate outside Router — Error: useNavigate() may be used only in the context of a <Router> component. (React)useNavigate outside…URIError — URIError: URI malformed (JavaScript)URIErrorinvalid selector — DOMException: Failed to execute 'querySelector' on 'Document': 'x' is not a valid selector (JavaScript)invalid selectorblocked a frame — SecurityError: Blocked a frame with origin "x" from accessing a cross-origin frame. (JavaScript)blocked a framesetState() called after dispose() — Flutter: setState() called after dispose(): _MyState#1a2b3 (lifecycle state: defunct, not mounted) (Flutter / Dart)setState() called a…BoxConstraints forces an infinite width — Flutter: BoxConstraints forces an infinite width. These invalid constraints were provided to RenderStack's layout() function (TextField in a Row) (Flutter / Dart)BoxConstraints forc…Scaffold.of() called with a context that does not contain a Scaffold — Flutter: Scaffold.of() called with a context that does not contain a Scaffold (Flutter / Dart)Scaffold.of() calle…SyntaxError: JSON — SyntaxError: Unexpected token < in JSON at position 0 (JavaScript)SyntaxError: JSONMIME type not executable — Refused to execute script from 'x' because its MIME type ('text/html') is not executable (JavaScript)MIME type not execu…ChunkLoadError — ChunkLoadError: Loading chunk 123 failed. (JavaScript)ChunkLoadErrorGraphQL Syntax Error — GraphQL: Syntax Error: Expected Name, found <EOF> / Unexpected } (API)GraphQL Syntax ErrorTS1005: ';' expected / ',' expected (syntax error) — TypeScript: error TS1005: ';' expected. (TypeScript)TS1005: ';' expecte…Element is missing end tag — Vue: [plugin:vite:vue] Element is missing end tag. / Invalid end tag. (Vue)Element is missing …

Directly related (12)

TS1128: Declaration or statement expectedTypeScript

TypeScript: error TS1128: Declaration or statement expected.

The parser found a token where a declaration or statement should start — usually stray braces/parentheses or code outside a funct…

UnhandledPromiseRejectionNode.js

Node.js: [UnhandledPromiseRejection] — This error originated either by throwing inside of an async function without a catch block

A promise rejected and nothing handled it; since Node 15 this crashes the process.

body already usedJavaScript

TypeError: Failed to execute 'json' on 'Response': body stream already read

A fetch Response body was consumed twice (e.g. calling .text() then .json()).

unknown instructionDocker

Dockerfile parse error line N: unknown instruction

A line in the Dockerfile doesn’t start with a valid instruction — usually a broken line continuation or a typo.

IndentationErrorPython

IndentationError: unexpected indent / expected an indented block

Python’s block structure is broken — inconsistent indentation or mixed tabs and spaces.

already declaredJavaScript

SyntaxError: Identifier 'x' has already been declared

The same let/const/class name was declared twice in the same scope.

Event loop is closedPython

RuntimeError: Event loop is closed

Async code tried to use an event loop that has already been shut down.

not wrapped in actReact

Warning: An update to Component inside a test was not wrapped in act(...)

A component updated state after the test’s synchronous assertions — async work wasn’t awaited.

AbortErrorJavaScript

AbortError: The user aborted a request. / signal is aborted without reason

A fetch was cancelled through an AbortController (or the browser cancelled it).

Looking up a deactivated widget's ancestor is unsafeFlutter / Dart

Flutter: Looking up a deactivated widget's ancestor is unsafe. At this point the state of the widget's element tree is no longer stable

You used a `BuildContext` after its widget was removed from the tree — typically after an `await` when the user already navigated…

Unexpected token <JavaScript

SyntaxError: Unexpected token '<' (HTML served instead of JavaScript)

The browser loaded a .js file but received HTML (an error page or the SPA index.html).

missing )JavaScript

SyntaxError: missing ) after argument list

A function call’s parentheses are unbalanced — often an unescaped quote or a missing comma/plus.

Two steps away (36)

unexpected end of inputJavaScript

SyntaxError: Unexpected end of input

The parser reached the end of the code (or JSON) while still expecting more — a missing } ) ] or empty JSON.

unexpected identifierJavaScript

SyntaxError: Unexpected identifier

The parser found a name where it expected punctuation — usually a missing comma, operator or quote.

invalid tokenJavaScript

SyntaxError: Invalid or unexpected token

The code contains a character the parser can’t handle — smart quotes, stray characters or an unterminated string.

ECONNREFUSEDNode.js

Error: connect ECONNREFUSED 127.0.0.1:5432

Nothing is listening at that host:port — the target service is down or you’re connecting to the wrong address.

Failed to fetchJavaScript

TypeError: Failed to fetch / NetworkError when attempting to fetch resource

The browser couldn’t complete the request at the network level — CORS, DNS, offline, blocked mixed content, or the server refused…

ERR_REQUIRE_ESMNode.js

Error [ERR_REQUIRE_ESM]: require() of ES Module not supported

CommonJS code used `require()` on a package that is ES-module-only (node-fetch 3, chalk 5, nanoid 4, got 12…).

SocketException resetJava

java.net.SocketException: Connection reset

The remote side closed the TCP connection abruptly while Java was reading or writing.

reduce emptyJavaScript

TypeError: Reduce of empty array with no initial value

Array.reduce() ran on an empty array without an initial value.

invalid array lengthJavaScript

RangeError: Invalid array length

An array was created or resized with a negative, fractional or enormous length.

Parse errorPHP

PHP Parse error: syntax error, unexpected …

PHP can’t parse the file because of a syntax mistake — the real error is often on the line before the one reported.

ELIFECYCLEnpm

npm ERR! code ELIFECYCLE / Command failed with exit code 1

An npm script (build, start, test, postinstall) exited with an error. ELIFECYCLE is only the wrapper — the real error is printed…

gyp ERR!npm

gyp ERR! build error / node-gyp rebuild failed

A dependency with native C/C++ code couldn’t compile — missing build tools, Python, or an unsupported Node version.

NameErrorPython

NameError: name 'x' is not defined

Python doesn’t know the name — it was never assigned/imported in this scope, or it’s misspelled.

compose validationDocker

docker compose: services.x Additional property y is not allowed / yaml: line N: mapping values are not allowed

The compose file is invalid YAML or uses a key Compose doesn’t recognise at that level (usually an indentation mistake).

invalid regexJavaScript

SyntaxError: Invalid regular expression: /x/: Unterminated group

A regex pattern has invalid syntax — unbalanced parentheses/brackets or unescaped special characters.

ReferenceErrorJavaScript

ReferenceError: x is not defined

Code refers to a variable or function name that doesn’t exist in the current scope.

TDZJavaScript

ReferenceError: Cannot access 'x' before initialization

A let/const/class was used before its declaration line ran (temporal dead zone) — often a circular import.

SyntaxErrorPython

SyntaxError: invalid syntax

Python couldn’t parse the code. The caret (^) points at or just after the mistake.

TypeError argumentsPython

TypeError: f() takes 1 positional argument but 2 were given

A function was called with more positional arguments than it accepts — very often a method missing `self`.

TypeError missing argPython

TypeError: f() missing 1 required positional argument: 'x'

A function was called without a required parameter.

IndexErrorPython

IndexError: list index out of range

Code accessed a list position that doesn’t exist.

never awaitedPython

RuntimeWarning: coroutine 'fetch' was never awaited

An async function was called without await, so it never ran.

validateDOMNestingReact

Warning: validateDOMNesting(...): <div> cannot appear as a descendant of <p>.

The JSX produces invalid HTML nesting, which also causes hydration mismatches in SSR.

useNavigate outside RouterReact

Error: useNavigate() may be used only in the context of a <Router> component.

A React Router hook ran in a component that isn’t rendered inside a Router provider.

URIErrorJavaScript

URIError: URI malformed

decodeURIComponent/decodeURI received an invalid percent-encoded sequence.

invalid selectorJavaScript

DOMException: Failed to execute 'querySelector' on 'Document': 'x' is not a valid selector

The CSS selector string is invalid — often an ID starting with a digit or containing special characters.

blocked a frameJavaScript

SecurityError: Blocked a frame with origin "x" from accessing a cross-origin frame.

Script tried to read or modify an iframe (or window) from another origin.

setState() called after dispose()Flutter / Dart

Flutter: setState() called after dispose(): _MyState#1a2b3 (lifecycle state: defunct, not mounted)

An async callback (network, timer, stream) finished after the widget was removed and then called setState.

BoxConstraints forces an infinite widthFlutter / Dart

Flutter: BoxConstraints forces an infinite width. These invalid constraints were provided to RenderStack's layout() function (TextField in a Row)

A widget that needs a finite width, like a `TextField` or `Container` with no size, was placed where the parent offers unlimited…

Scaffold.of() called with a context that does not contain a ScaffoldFlutter / Dart

Flutter: Scaffold.of() called with a context that does not contain a Scaffold

You called `Scaffold.of(context)` (or `ScaffoldMessenger`) using the same `BuildContext` that created the Scaffold, which is abov…

SyntaxError: JSONJavaScript

SyntaxError: Unexpected token < in JSON at position 0

`JSON.parse()` / `response.json()` received something that isn’t JSON — very often an HTML error page.

MIME type not executableJavaScript

Refused to execute script from 'x' because its MIME type ('text/html') is not executable

The browser fetched a script but the server labelled it text/html (usually an error page), so it refused to run it.

ChunkLoadErrorJavaScript

ChunkLoadError: Loading chunk 123 failed.

A lazily loaded JavaScript chunk couldn’t be downloaded — usually because a new deployment removed the old hashed files.

GraphQL Syntax ErrorAPI

GraphQL: Syntax Error: Expected Name, found <EOF> / Unexpected }

The GraphQL document is malformed — unbalanced braces, a stray comma/character, or an empty query.

TS1005: ';' expected / ',' expected (syntax error)TypeScript

TypeScript: error TS1005: ';' expected.

The parser hit a syntax error — missing punctuation, mismatched brackets, or an unsupported syntax for your TypeScript version.

Element is missing end tagVue

Vue: [plugin:vite:vue] Element is missing end tag. / Invalid end tag.

The template has unbalanced HTML tags.