Error map

Router.use middleware TypeError: Router.use() requires a middleware function but got a Object

Node.js · layer 4, Application & API

Open the full error page →

Centre: this error. First ring: errors it is linked with (8). 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.

Router.use middleware — TypeError: Router.use() requires a middleware function but got a Object (Node.js)Router.use …1046 — MySQL ERROR 1046 (3D000): No database selected (MySQL)1046TypeError: not a function — TypeError: x is not a function (JavaScript)TypeError: not a fu…not a constructor — TypeError: x is not a constructor (JavaScript)not a constructorpath-to-regexp — TypeError: Missing parameter name at 1 (path-to-regexp) (Node.js)path-to-regexpdeclared and not used — Go: declared and not used: x / "fmt" imported and not used (Go)declared and not us…ERR_HTTP_HEADERS_SENT — Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client (Node.js)ERR_HTTP_HEADERS_SE…req.body undefined — Express: req.body is undefined / {} (body parser missing) (Node.js)req.body undefinedTDZ — ReferenceError: Cannot access 'x' before initialization (JavaScript)TDZredirect_uri_mismatch — OAuth Error: redirect_uri_mismatch (Authentication)redirect_uri_mismat…divergent branches — hint: You have divergent branches and need to specify how to reconcile them. (Git)divergent branchesgpg failed to sign — error: gpg failed to sign the data — fatal: failed to write commit object (Git)gpg failed to signMODULE_NOT_FOUND — Error: Cannot find module 'x' (MODULE_NOT_FOUND) (Node.js)MODULE_NOT_FOUNDTypeError — TypeError: Cannot read properties of undefined (reading 'x') (JavaScript)TypeErrorReferenceError — ReferenceError: x is not defined (JavaScript)ReferenceError1153 — 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 collation404 — HTTP 404 Not Found (HTTP)404405 — HTTP 405 Method Not Allowed (HTTP)405Whitelabel Error Page — Whitelabel Error Page — This application has no explicit mapping for /error (Java)Whitelabel Error Pa…ImportError — ImportError: cannot import name 'x' from 'y' (Python)ImportError22021 — ERROR: invalid byte sequence for encoding "UTF8": 0x00 (PostgreSQL)22021Element type is invalid — Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined (React)Element type is inv…Headers already sent — Warning: Cannot modify header information - headers already sent (PHP)Headers already sentSyntaxError import — SyntaxError: Cannot use import statement outside a module (Node.js)SyntaxError importDEP0005 — DeprecationWarning: Buffer() is deprecated due to security and usability issues (DEP0005) (Node.js)DEP0005DEP0040 — DeprecationWarning: The `punycode` module is deprecated (DEP0040) (Node.js)DEP0040Mongoose ValidationError — ValidationError: User validation failed: email: Path `email` is required. (Node.js)Mongoose Validation…NameError — NameError: name 'x' is not defined (Python)NameErroralready declared — SyntaxError: Identifier 'x' has already been declared (JavaScript)already declaredUnboundLocalError — UnboundLocalError: cannot access local variable 'x' where it is not associated with a value (Python)UnboundLocalError

Directly related (8)

Two steps away (23)

redirect_uri_mismatchAuthentication

OAuth Error: redirect_uri_mismatch

The redirect URI in your OAuth request doesn’t exactly match one registered for the client in the provider’s console.

divergent branchesGit

hint: You have divergent branches and need to specify how to reconcile them.

Git 2.27+ asks you to choose merge, rebase or fast-forward-only when local and remote both have new commits.

gpg failed to signGit

error: gpg failed to sign the data — fatal: failed to write commit object

Commit signing is enabled but GPG couldn’t sign — no TTY for the passphrase, wrong key, or agent not running.

MODULE_NOT_FOUNDNode.js

Error: Cannot find module 'x' (MODULE_NOT_FOUND)

Node can’t resolve the module path — the package isn’t installed, or a relative path/extension is wrong.

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…

ReferenceErrorJavaScript

ReferenceError: x is not defined

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

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.

404HTTP

HTTP 404 Not Found

The server can’t find anything at the requested URL.

405HTTP

HTTP 405 Method Not Allowed

The URL exists, but it doesn’t accept the HTTP method you used (e.g. POST to a GET-only route).

Whitelabel Error PageJava

Whitelabel Error Page — This application has no explicit mapping for /error

Spring Boot’s default error page — the request hit no controller mapping (404) or a controller threw (500).

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.

22021PostgreSQL

ERROR: invalid byte sequence for encoding "UTF8": 0x00

Text contained bytes invalid in UTF-8 — often a NUL byte (0x00) or Latin-1/Windows-1252 data.

Element type is invalidReact

Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined

JSX referenced a component that is undefined — almost always a default/named import mismatch.

Headers already sentPHP

Warning: Cannot modify header information - headers already sent

You called `header()`, `setcookie()` or `session_start()` after output had already been sent to the browser.

SyntaxError importNode.js

SyntaxError: Cannot use import statement outside a module

An `import` statement ran in a context treated as CommonJS (Node without "type": "module", a browser script without type="module"…

DEP0005Node.js

DeprecationWarning: Buffer() is deprecated due to security and usability issues (DEP0005)

Code (yours or a dependency) uses the deprecated new Buffer() constructor.

DEP0040Node.js

DeprecationWarning: The `punycode` module is deprecated (DEP0040)

A dependency imports Node’s built-in punycode module, deprecated since Node 21.

Mongoose ValidationErrorNode.js

ValidationError: User validation failed: email: Path `email` is required.

A document failed Mongoose schema validation before saving.

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.

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…