Error map

CS0103 error CS0103: The name 'x' does not exist in the current context

.NET · layer 4, Application & API

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.

CS0103 — error CS0103: The name 'x' does not exist in the current context (.NET)CS0103ReferenceError — ReferenceError: x is not defined (JavaScript)ReferenceErrorUnboundLocalError — UnboundLocalError: cannot access local variable 'x' where it is not associated with a value (Python)UnboundLocalErrorunable to type-check this expression in reasonable time — Swift: The compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions (iOS)unable to type-chec…NameError — NameError: name 'x' is not defined (Python)NameErroralready declared — SyntaxError: Identifier 'x' has already been declared (JavaScript)already declaredCS0246 — error CS0246: The type or namespace name 'X' could not be found (are you missing a using directive or an assembly reference?) (.NET)CS0246declared and not used — Go: declared and not used: x / "fmt" imported and not used (Go)declared and not us…E0308 — Rust: error[E0308]: mismatched types — expected `X`, found `Y` (Rust)E0308CS1061 — error CS1061: 'X' does not contain a definition for 'Y' and no accessible extension method 'Y' accepting a first argument of type 'X' could be found (.NET)CS1061Type of expression is ambiguous — Swift: Type of expression is ambiguous without a type annotation (more context) (iOS)Type of expression …CS8618 — warning CS8618: Non-nullable property 'X' must contain a non-null value when exiting constructor. Consider declaring the property as nullable (.NET)CS8618TDZ — ReferenceError: Cannot access 'x' before initialization (JavaScript)TDZTypeError — TypeError: Cannot read properties of undefined (reading 'x') (JavaScript)TypeErrorTypeError: not a function — TypeError: x is not a function (JavaScript)TypeError: not a fu…Hydration failed — Error: Hydration failed because the initial UI does not match what was rendered on the server (React)Hydration failedAttributeError — AttributeError: 'X' object has no attribute 'y' (Python)AttributeErrorConnectionRefusedError — ConnectionRefusedError: [Errno 111] Connection refused (Python)ConnectionRefusedEr…Event loop is closed — RuntimeError: Event loop is closed (Python)Event loop is closedIndex out of range — Swift: Fatal error: Index out of range (iOS)Index out of rangeCould not cast value of type — Swift: Could not cast value of type 'X' to 'Y' (iOS)Could not cast valu…is only available in iOS x or newer — Swift: 'X' is only available in iOS 16.0 or newer (iOS)is only available i…ModuleNotFoundError — ModuleNotFoundError: No module named 'x' (Python)ModuleNotFoundErrorIndentationError — IndentationError: unexpected indent / expected an indented block (Python)IndentationErrorUnexpected token < — SyntaxError: Unexpected token '<' (HTML served instead of JavaScript) (JavaScript)Unexpected token <unexpected end of input — SyntaxError: Unexpected end of input (JavaScript)unexpected end of i…missing ) — SyntaxError: missing ) after argument list (JavaScript)missing )NU1101 — error NU1101: Unable to find package X. No packages exist with this id in source(s): nuget.org (.NET)NU1101The request matched multiple endpoints — AmbiguousMatchException: The request matched multiple endpoints. Matches: X, Y (.NET)The request matched…Reference to undeclared resource — Terraform: Error: Reference to undeclared resource / Reference to undeclared input variable (Terraform)Reference to undecl…ImportError — ImportError: cannot import name 'x' from 'y' (Python)ImportErrornot a constructor — TypeError: x is not a constructor (JavaScript)not a constructor1046 — MySQL ERROR 1046 (3D000): No database selected (MySQL)1046ClassCastException — java.lang.ClassCastException: class A cannot be cast to class B (Java)ClassCastExceptionTS7016 — TS7016: Could not find a declaration file for module 'x'. 'x.js' implicitly has an 'any' type. (Node.js)TS7016TS2304 — TS2304: Cannot find name 'x'. (Node.js)TS2304antiforgery token could not be decrypted — ASP.NET Core: The antiforgery token could not be decrypted / The required antiforgery cookie is not present (400 Bad Request) (.NET)antiforgery token c…Cannot convert value of type — Swift: Cannot convert value of type 'X' to expected argument type 'Y' (iOS)Cannot convert valu…Escaping closure captures mutating 'self' — Swift: Escaping closure captures mutating 'self' parameter (iOS)Escaping closure ca…requires explicit use of 'self' — Swift: Reference to property 'x' in closure requires explicit use of 'self' to make capture semantics explicit (iOS)requires explicit u…NullReferenceException — System.NullReferenceException: Object reference not set to an instance of an object (.NET)NullReferenceExcept…1153 — MySQL ERROR 1153 (08S01): Got a packet bigger than 'max_allowed_packet' bytes (MySQL)11531227 — MySQL ERROR 1227 (42000): Access denied; you need (at least one of) the SUPER privilege(s) for this operation (MySQL)1227Unknown collation — MySQL ERROR 1273 (HY000): Unknown collation: 'utf8mb4_0900_ai_ci' (MySQL)Unknown collation

Directly related (12)

ReferenceErrorJavaScript

ReferenceError: x is not defined

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

UnboundLocalErrorPython

UnboundLocalError: cannot access local variable 'x' where it is not associated with a value

A function assigns to a variable somewhere, which makes it local everywhere in that function — so reading it before the assignmen…

unable to type-check this expression in reasonable timeiOS

Swift: The compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions

A long expression (often in a SwiftUI body) has too many possible type combinations for the compiler — or hides a type error.

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.

already declaredJavaScript

SyntaxError: Identifier 'x' has already been declared

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

CS0246.NET

error CS0246: The type or namespace name 'X' could not be found (are you missing a using directive or an assembly reference?)

The compiler doesn’t know the type — missing using, missing NuGet package/project reference, or a target framework mismatch.

declared and not usedGo

Go: declared and not used: x / "fmt" imported and not used

Go refuses to compile code with unused local variables or unused imports.

E0308Rust

Rust: error[E0308]: mismatched types — expected `X`, found `Y`

A value’s type doesn’t match what the context expects — common with &str vs String, Option/Result vs plain values, and integer ty…

CS1061.NET

error CS1061: 'X' does not contain a definition for 'Y' and no accessible extension method 'Y' accepting a first argument of type 'X' could be found

The member you call doesn’t exist on that type — typo, wrong type, missing using for an extension method, or an API removed in a…

Type of expression is ambiguousiOS

Swift: Type of expression is ambiguous without a type annotation (more context)

The compiler can’t infer which type you mean — often because of a typo or a wrong argument elsewhere in the expression.

CS8618.NET

warning CS8618: Non-nullable property 'X' must contain a non-null value when exiting constructor. Consider declaring the property as nullable

With nullable reference types enabled, a non-nullable reference property isn’t initialised by the constructor.

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.

Two steps away (31)

TypeErrorJavaScript

TypeError: Cannot read properties of undefined (reading 'x')

You tried to access a property on a value that is `undefined` (or `null`) — usually data that hasn’t loaded yet or a wrong proper…

TypeError: not a functionJavaScript

TypeError: x is not a function

You called something as a function, but its value is not a function (it’s undefined, a string, an object…).

Hydration failedReact

Error: Hydration failed because the initial UI does not match what was rendered on the server

The HTML rendered on the server differs from the first client render, so React (Next.js/Remix) can’t attach to it.

AttributeErrorPython

AttributeError: 'X' object has no attribute 'y'

You accessed an attribute or method that doesn’t exist on that object type.

ConnectionRefusedErrorPython

ConnectionRefusedError: [Errno 111] Connection refused

Nothing is listening on the host/port Python tried to connect to.

Event loop is closedPython

RuntimeError: Event loop is closed

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

Index out of rangeiOS

Swift: Fatal error: Index out of range

Code accessed an array index that doesn’t exist — empty arrays, off-by-one loops, or data changing while a table reloads.

Could not cast value of typeiOS

Swift: Could not cast value of type 'X' to 'Y'

A force cast (as!) failed because the object isn’t the expected type.

is only available in iOS x or neweriOS

Swift: 'X' is only available in iOS 16.0 or newer

You used an API that requires a newer iOS than your deployment target.

ModuleNotFoundErrorPython

ModuleNotFoundError: No module named 'x'

Python can’t find the module you import — it isn’t installed in the interpreter/virtualenv that’s running, or the import path is…

IndentationErrorPython

IndentationError: unexpected indent / expected an indented block

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

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).

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.

missing )JavaScript

SyntaxError: missing ) after argument list

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

NU1101.NET

error NU1101: Unable to find package X. No packages exist with this id in source(s): nuget.org

NuGet restore can’t find the package in any configured source — typo, private feed not configured/authenticated, or nuget.org mis…

The request matched multiple endpoints.NET

AmbiguousMatchException: The request matched multiple endpoints. Matches: X, Y

Two controller actions or minimal API endpoints have the same route and HTTP method.

Reference to undeclared resourceTerraform

Terraform: Error: Reference to undeclared resource / Reference to undeclared input variable

The configuration refers to a resource, data source, variable or module output that isn’t declared in this module.

ImportErrorPython

ImportError: cannot import name 'x' from 'y'

The module was found, but the name you’re importing from it doesn’t exist — usually a version change or a circular import.

not a constructorJavaScript

TypeError: x is not a constructor

new was used with something that isn’t a class/constructor — usually a wrong import.

1046MySQL

MySQL ERROR 1046 (3D000): No database selected

A query referenced tables without a database selected (no USE and no db in the connection).

ClassCastExceptionJava

java.lang.ClassCastException: class A cannot be cast to class B

An object was cast to a type it isn’t.

TS7016Node.js

TS7016: Could not find a declaration file for module 'x'. 'x.js' implicitly has an 'any' type.

The JavaScript package has no TypeScript types bundled and no @types package installed.

TS2304Node.js

TS2304: Cannot find name 'x'.

TypeScript doesn’t know an identifier — a missing import, missing type definitions (e.g. for Node or Jest globals), or a typo.

antiforgery token could not be decrypted.NET

ASP.NET Core: The antiforgery token could not be decrypted / The required antiforgery cookie is not present (400 Bad Request)

Form POST failed antiforgery validation — the token is missing, the cookie is missing, or Data Protection keys changed so old tok…

Cannot convert value of typeiOS

Swift: Cannot convert value of type 'X' to expected argument type 'Y'

The value’s type doesn’t match what the function or property expects.

Escaping closure captures mutating 'self'iOS

Swift: Escaping closure captures mutating 'self' parameter

A mutating method of a struct tries to capture self in an escaping closure, which Swift forbids.

requires explicit use of 'self'iOS

Swift: Reference to property 'x' in closure requires explicit use of 'self' to make capture semantics explicit

In an escaping closure inside a class, Swift requires self. to make the capture (and potential retain cycle) visible.

NullReferenceException.NET

System.NullReferenceException: Object reference not set to an instance of an object

Code dereferenced a variable that is `null` — the .NET equivalent of Java’s NullPointerException.

1153MySQL

MySQL ERROR 1153 (08S01): Got a packet bigger than 'max_allowed_packet' bytes

A single statement or row exceeded max_allowed_packet — big BLOBs, huge INSERTs or large dump lines.

1227MySQL

MySQL ERROR 1227 (42000): Access denied; you need (at least one of) the SUPER privilege(s) for this operation

The import or statement needs SUPER/SYSTEM_VARIABLES_ADMIN — typical with dumps containing DEFINER clauses or SET GLOBAL on manag…

Unknown collationMySQL

MySQL ERROR 1273 (HY000): Unknown collation: 'utf8mb4_0900_ai_ci'

A dump from MySQL 8 uses a collation the target server (MySQL 5.7 / MariaDB) doesn’t support.