Error map

TS2614: Module has no exported member — did you mean to use 'import x from' TypeScript: error TS2614: Module '"./Button"' has no exported member 'Button'. Did you mean to use 'import Button from "./Button"' instead?

TypeScript · 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.

TS2614: Module has no exported member — did you mean to use 'import x from' — TypeScript: error TS2614: Module '"./Button"' has no exported member 'Button'. Did you mean to use 'import Button from "./Button"' instead? (TypeScript)TS2614: Mod…TypeError: not a function — TypeError: x is not a function (JavaScript)TypeError: not a fu…Element 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…Router.use middleware — TypeError: Router.use() requires a middleware function but got a Object (Node.js)Router.use middlewa…Module not found: Can't resolve 'x' (Next.js build) — Next.js: Module not found: Can't resolve '@/components/Button' / 'lodash' in '/app/src' (Next.js)Module not found: C…TS2305: Module has no exported member — TypeScript: error TS2305: Module '"./utils"' has no exported member 'helper'. (TypeScript)TS2305: Module has …TS2451: Cannot redeclare block-scoped variable — TypeScript: error TS2451: Cannot redeclare block-scoped variable 'name'. (TypeScript)TS2451: Cannot rede…TS1259: Module can only be default-imported using the 'esModuleInterop' flag — TypeScript: error TS1259: Module '"express"' can only be default-imported using the 'esModuleInterop' flag (TypeScript)TS1259: Module can …TS1208: File cannot be compiled under '--isolatedModules' because it is considered a global script file — TypeScript: error TS1208: 'index.ts' cannot be compiled under '--isolatedModules' because it is considered a global script file. Add an import, export, or an empty 'export {}' statement (TypeScript)TS1208: File cannot…TS2792: Cannot find module — did you mean to set the 'moduleResolution' option to 'nodenext' — TypeScript: error TS2792: Cannot find module 'x'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option? (TypeScript)TS2792: Cannot find…TS1192: Module has no default export — TypeScript: error TS1192: Module '"./utils"' has no default export. (TypeScript)TS1192: Module has …TS1484/TS1205: type must be imported using a type-only import — TypeScript: error TS1484: 'User' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled. (TypeScript)TS1484/TS1205: type…Cannot find module './App.vue' or its corresponding type declarations — TypeScript: error TS2307: Cannot find module './App.vue' or its corresponding type declarations. (Vue)Cannot find module …MODULE_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)ReferenceErrorObjects are not valid as a React child — Error: Objects are not valid as a React child (React)Objects are not val…Too many re-renders — Error: Too many re-renders. React limits the number of renders to prevent an infinite loop. (React)Too many re-rendersunique key prop — Warning: Each child in a list should have a unique "key" prop (React)unique key propnot a constructor — TypeError: x is not a constructor (JavaScript)not a constructorTDZ — ReferenceError: Cannot access 'x' before initialization (JavaScript)TDZ1046 — MySQL ERROR 1046 (3D000): No database selected (MySQL)1046Can't resolve 'fs' — Module not found: Can't resolve 'fs' (Next.js / webpack 5) (React)Can't resolve 'fs'Page is missing generateStaticParams() (output: export) — Next.js: Page "/blog/[slug]" is missing "generateStaticParams()" so it cannot be used with "output: export" config (Next.js)Page is missing gen…Failed to compile: ESLint errors during next build — Next.js: Failed to compile. ./src/app/page.tsx 12:7 Error: 'x' is assigned a value but never used. @typescript-eslint/no-unused-vars (Next.js)Failed to compile: …TS2307 — TS2307: Cannot find module 'x' or its corresponding type declarations. (Node.js)TS2307TS5095: Option 'bundler' can only be used when 'module' is set to 'preserve' or 'es2015' or later — TypeScript: error TS5095 (TypeScript)TS5095: Option 'bun…already declared — SyntaxError: Identifier 'x' has already been declared (JavaScript)already declaredTS2300: Duplicate identifier — TypeScript: error TS2300: Duplicate identifier 'Foo'. (TypeScript)TS2300: Duplicate i…TS2393: Duplicate function implementation — TypeScript: error TS2393: Duplicate function implementation. (TypeScript)TS2393: Duplicate f…ERR_REQUIRE_ESM — Error [ERR_REQUIRE_ESM]: require() of ES Module not supported (Node.js)ERR_REQUIRE_ESMSyntaxError import — SyntaxError: Cannot use import statement outside a module (Node.js)SyntaxError importERR_IMPORT_ATTRIBUTE_MISSING — TypeError [ERR_IMPORT_ATTRIBUTE_MISSING]: Module needs an import attribute of "type: json" (Node.js)ERR_IMPORT_ATTRIBUT…ERR_PACKAGE_PATH_NOT_EXPORTED — Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './x' is not defined by "exports" (Node.js)ERR_PACKAGE_PATH_NO…TS2531: Object is possibly 'null' — TypeScript: error TS2531: Object is possibly 'null'. (TypeScript)TS2531: Object is p…TS2551: Property does not exist. Did you mean — TypeScript: error TS2551: Property 'lenght' does not exist on type 'string'. Did you mean 'length'? (TypeScript)TS2551: Property do…TS2688: Cannot find type definition file for 'x' — TypeScript: error TS2688: Cannot find type definition file for 'node'. (TypeScript)TS2688: Cannot find…TS2802: Type can only be iterated through when using the '--downlevelIteration' flag — TypeScript: error TS2802: Type 'Set<string>' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher (TypeScript)TS2802: Type can on…TS5083: Cannot read file tsconfig.json / extends not found — TypeScript: error TS5083: Cannot read file '/app/tsconfig.json'. / error TS6053: File 'tsconfig.base.json' not found (TypeScript)TS5083: Cannot read…ERR_UNKNOWN_FILE_EXTENSION — TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" (Node.js)ERR_UNKNOWN_FILE_EX…TS2532 / TS18048 — TS18048: 'x' is possibly 'undefined'. (TS2532: Object is possibly 'undefined'.) (Node.js)TS2532 / TS18048Type error during next build — Next.js: Failed to compile. ./src/app/page.tsx:15:9 Type error: Type 'string | undefined' is not assignable to type 'string' (Next.js)Type error during n…TS2693: 'X' only refers to a type, but is being used as a value here — TypeScript: error TS2693: 'User' only refers to a type, but is being used as a value here. (TypeScript)TS2693: 'X' only re…TS1005: ';' expected / ',' expected (syntax error) — TypeScript: error TS1005: ';' expected. (TypeScript)TS1005: ';' expecte…TS1128: Declaration or statement expected — TypeScript: error TS1128: Declaration or statement expected. (TypeScript)TS1128: Declaration…TS7016 — 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)TS2304TS2339 — TS2339: Property 'x' does not exist on type 'Y'. (Node.js)TS2339

Directly related (12)

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

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.

Router.use middlewareNode.js

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

app.use()/router.use() received an object instead of a function — usually a router module that wasn’t exported.

Module not found: Can't resolve 'x' (Next.js build)Next.js

Next.js: Module not found: Can't resolve '@/components/Button' / 'lodash' in '/app/src'

Webpack/Turbopack couldn't resolve an import — wrong path/alias, missing dependency or case mismatch.

TS2305: Module has no exported memberTypeScript

TypeScript: error TS2305: Module '"./utils"' has no exported member 'helper'.

You imported a named export that the module doesn't export.

TS2451: Cannot redeclare block-scoped variableTypeScript

TypeScript: error TS2451: Cannot redeclare block-scoped variable 'name'.

A `let`/`const`/`class` name was declared twice in the same scope — often because files are global scripts sharing one scope.

TS1259: Module can only be default-imported using the 'esModuleInterop' flagTypeScript

TypeScript: error TS1259: Module '"express"' can only be default-imported using the 'esModuleInterop' flag

You default-import a CommonJS module that uses `export =`, but `esModuleInterop` isn't enabled.

TS1208: File cannot be compiled under '--isolatedModules' because it is considered a global script fileTypeScript

TypeScript: error TS1208: 'index.ts' cannot be compiled under '--isolatedModules' because it is considered a global script file. Add an import, export, or an empty 'export {}' statement

With `isolatedModules`, every file must be a module (have an import or export).

TS2792: Cannot find module — did you mean to set the 'moduleResolution' option to 'nodenext'TypeScript

TypeScript: error TS2792: Cannot find module 'x'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option?

TypeScript can't resolve a package because `moduleResolution` doesn't match how the package exports (package `exports` map) or pa…

TS1192: Module has no default exportTypeScript

TypeScript: error TS1192: Module '"./utils"' has no default export.

You used `import x from "./mod"` but the module only has named exports.

TS1484/TS1205: type must be imported using a type-only importTypeScript

TypeScript: error TS1484: 'User' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.

With `verbatimModuleSyntax` or `isolatedModules`, types must be imported/re-exported with `import type` / `export type`.

Cannot find module './App.vue' or its corresponding type declarationsVue

TypeScript: error TS2307: Cannot find module './App.vue' or its corresponding type declarations.

TypeScript doesn't know what a `.vue` import is without a shim or Volar/`vue-tsc`.

Two steps away (35)

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.

Objects are not valid as a React childReact

Error: Objects are not valid as a React child

You tried to render a plain object (or a Promise/Date) directly in JSX; React can only render strings, numbers, elements and arra…

Too many re-rendersReact

Error: Too many re-renders. React limits the number of renders to prevent an infinite loop.

A state update runs during render, which triggers another render, which updates state again — forever.

unique key propReact

Warning: Each child in a list should have a unique "key" prop

When rendering a list with `.map()`, each element needs a stable, unique `key` so React can track items between renders.

not a constructorJavaScript

TypeError: x is not a constructor

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

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.

1046MySQL

MySQL ERROR 1046 (3D000): No database selected

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

Can't resolve 'fs'React

Module not found: Can't resolve 'fs' (Next.js / webpack 5)

A Node.js built-in (fs, path, crypto, net) is imported into code that runs in the browser bundle.

Page is missing generateStaticParams() (output: export)Next.js

Next.js: Page "/blog/[slug]" is missing "generateStaticParams()" so it cannot be used with "output: export" config

A dynamic route can't be statically exported without telling Next.js which paths to generate.

Failed to compile: ESLint errors during next buildNext.js

Next.js: Failed to compile. ./src/app/page.tsx 12:7 Error: 'x' is assigned a value but never used. @typescript-eslint/no-unused-vars

`next build` runs ESLint and fails the build on lint errors.

TS2307Node.js

TS2307: Cannot find module 'x' or its corresponding type declarations.

TypeScript can’t resolve the import — the package isn’t installed, the path alias isn’t configured, or there are no types.

TS5095: Option 'bundler' can only be used when 'module' is set to 'preserve' or 'es2015' or laterTypeScript

TypeScript: error TS5095

`moduleResolution: "bundler"` needs a compatible `module` setting.

already declaredJavaScript

SyntaxError: Identifier 'x' has already been declared

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

TS2300: Duplicate identifierTypeScript

TypeScript: error TS2300: Duplicate identifier 'Foo'.

The same name is declared twice in the same scope (or in merged global declarations).

TS2393: Duplicate function implementationTypeScript

TypeScript: error TS2393: Duplicate function implementation.

A function with the same name/signature is implemented more than once in the same scope.

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

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"…

ERR_IMPORT_ATTRIBUTE_MISSINGNode.js

TypeError [ERR_IMPORT_ATTRIBUTE_MISSING]: Module needs an import attribute of "type: json"

An ES module imported a .json file without the required import attribute.

ERR_PACKAGE_PATH_NOT_EXPORTEDNode.js

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './x' is not defined by "exports"

You imported a deep path inside a package that its package.json "exports" field doesn’t expose.

TS2531: Object is possibly 'null'TypeScript

TypeScript: error TS2531: Object is possibly 'null'.

You used a value that can be `null` without checking it first (strictNullChecks).

TS2551: Property does not exist. Did you meanTypeScript

TypeScript: error TS2551: Property 'lenght' does not exist on type 'string'. Did you mean 'length'?

A property name is misspelled (TypeScript suggests the closest valid one).

TS2688: Cannot find type definition file for 'x'TypeScript

TypeScript: error TS2688: Cannot find type definition file for 'node'.

`types` in tsconfig (or auto-included `@types/*`) refers to a package that isn't installed.

TS2802: Type can only be iterated through when using the '--downlevelIteration' flagTypeScript

TypeScript: error TS2802: Type 'Set<string>' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher

You iterate a Set/Map/generator with an old compile target (ES5) where `for...of`/spread aren't natively supported.

TS5083: Cannot read file tsconfig.json / extends not foundTypeScript

TypeScript: error TS5083: Cannot read file '/app/tsconfig.json'. / error TS6053: File 'tsconfig.base.json' not found

tsc/your IDE can't find or parse the tsconfig (wrong directory, bad `extends`, JSON error).

ERR_UNKNOWN_FILE_EXTENSIONNode.js

TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts"

Node tried to run a TypeScript file as ESM without a TypeScript loader.

TS2532 / TS18048Node.js

TS18048: 'x' is possibly 'undefined'. (TS2532: Object is possibly 'undefined'.)

TypeScript requires you to handle the case where a value may be undefined before using it.

Type error during next buildNext.js

Next.js: Failed to compile. ./src/app/page.tsx:15:9 Type error: Type 'string | undefined' is not assignable to type 'string'

TypeScript type checking failed during `next build`, which blocks the deployment.

TS2693: 'X' only refers to a type, but is being used as a value hereTypeScript

TypeScript: error TS2693: 'User' only refers to a type, but is being used as a value here.

You used an interface/type alias where a runtime value is needed.

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.

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…

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.

TS2339Node.js

TS2339: Property 'x' does not exist on type 'Y'.

TypeScript’s type for the object doesn’t include that property.