Error map

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

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

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…TS2532 / TS18048 — TS18048: 'x' is possibly 'undefined'. (TS2532: Object is possibly 'undefined'.) (Node.js)TS2532 / TS18048ERR_UNKNOWN_FILE_EXTENSION — TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" (Node.js)ERR_UNKNOWN_FILE_EX…TS2345 — TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'. (Node.js)TS2345TS2307 — TS2307: Cannot find module 'x' or its corresponding type declarations. (Node.js)TS2307TS7016 — 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)TS2339TS2551: 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…TS2305: Module has no exported member — TypeScript: error TS2305: Module '"./utils"' has no exported member 'helper'. (TypeScript)TS2305: Module has …TS2353: Object literal may only specify known properties — TypeScript: error TS2353: Object literal may only specify known properties, and 'nmae' does not exist in type 'User' (TypeScript)TS2353: Object lite…TS2366: Function lacks ending return statement — TypeScript: error TS2366: Function lacks ending return statement and return type does not include 'undefined'. (TypeScript)TS2366: Function la…TS2451: Cannot redeclare block-scoped variable — TypeScript: error TS2451: Cannot redeclare block-scoped variable 'name'. (TypeScript)TS2451: Cannot rede…TypeError — TypeError: Cannot read properties of undefined (reading 'x') (JavaScript)TypeErrorTypeError not iterable — TypeError: x is not iterable (JavaScript)TypeError not itera…TS2322 — TS2322: Type 'X' is not assignable to type 'Y' (TypeScript)TS2322ERR_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…ClassCastException — java.lang.ClassCastException: class A cannot be cast to class B (Java)ClassCastExceptionERR_INVALID_ARG_TYPE — TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined (Node.js)ERR_INVALID_ARG_TYPEUnable to cast object of type — System.InvalidCastException: Unable to cast object of type 'X' to type 'Y' (.NET)Unable to cast obje…MODULE_NOT_FOUND — Error: Cannot find module 'x' (MODULE_NOT_FOUND) (Node.js)MODULE_NOT_FOUNDVite failed to resolve import — [vite] Internal server error: Failed to resolve import "x" from "src/App.jsx". Does the file exist? (React)Vite failed to reso…Type 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…Cannot convert value of type — Swift: Cannot convert value of type 'X' to expected argument type 'Y' (iOS)Cannot convert valu…E0308 — Rust: error[E0308]: mismatched types — expected `X`, found `Y` (Rust)E0308TS2564 — TS2564: Property 'x' has no initializer and is not definitely assigned in the constructor (TypeScript)TS2564ReferenceError — ReferenceError: x is not defined (JavaScript)ReferenceErrorTS2300: Duplicate identifier — TypeScript: error TS2300: Duplicate identifier 'Foo'. (TypeScript)TS2300: Duplicate i…TS2688: Cannot find type definition file for 'x' — TypeScript: error TS2688: Cannot find type definition file for 'node'. (TypeScript)TS2688: Cannot find…TS2571: Object is of type 'unknown' — TypeScript: error TS2571: Object is of type 'unknown'. (TypeScript)TS2571: Object is o…TS2503: Cannot find namespace 'X' — TypeScript: error TS2503: Cannot find namespace 'JSX'. / Cannot find namespace 'NodeJS' (TypeScript)TS2503: Cannot find…TS2741: Property is missing in type but required in type — TypeScript: error TS2741: Property 'email' is missing in type '{ name: string; }' but required in type 'User'. (TypeScript)TS2741: Property is…TS7053: Element implicitly has an 'any' type because expression of type 'string' can't be used to index — TypeScript: error TS7053: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{ a: number; }' (TypeScript)TS7053: Element imp…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 …TS1192: Module has no default export — TypeScript: error TS1192: Module '"./utils"' has no default export. (TypeScript)TS1192: Module has …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: Module has …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…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…Object.keys null — TypeError: Cannot convert undefined or null to object (JavaScript)Object.keys nullread-only property — TypeError: Cannot assign to read only property 'x' of object (JavaScript)read-only propertyTS2379/TS2375: exactOptionalPropertyTypes error — TypeScript: error TS2379: Argument of type '{ name: string; age: undefined; }' is not assignable to parameter of type 'User' with 'exactOptionalPropertyTypes: true' (TypeScript)TS2379/TS2375: exac…TS2349: This expression is not callable — TypeScript: error TS2349: This expression is not callable. Type 'X' has no call signatures. (TypeScript)TS2349: This expres…TS2367: This comparison appears to be unintentional — TypeScript: error TS2367: This comparison appears to be unintentional because the types '"a" | "b"' and '"c"' have no overlap. (TypeScript)TS2367: This compar…TS2393: Duplicate function implementation — TypeScript: error TS2393: Duplicate function implementation. (TypeScript)TS2393: Duplicate f…already declared — SyntaxError: Identifier 'x' has already been declared (JavaScript)already declaredTDZ — ReferenceError: Cannot access 'x' before initialization (JavaScript)TDZTS2403: Subsequent variable declarations must have the same type — TypeScript: error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'string', but here has type 'number'. (TypeScript)TS2403: Subsequent …

Directly related (12)

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.

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.

TS2345Node.js

TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'.

A value’s type doesn’t match the function parameter — commonly a possibly-undefined value passed where a definite one is required.

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.

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.

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

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.

TS2353: Object literal may only specify known propertiesTypeScript

TypeScript: error TS2353: Object literal may only specify known properties, and 'nmae' does not exist in type 'User'

An object literal has an extra (or misspelled) property not in the target type (excess property check).

TS2366: Function lacks ending return statementTypeScript

TypeScript: error TS2366: Function lacks ending return statement and return type does not include 'undefined'.

A function with a declared return type can reach its end without returning on some path.

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.

Two steps away (36)

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 iterableJavaScript

TypeError: x is not iterable

for…of, spread or destructuring was used on something that isn’t an array/iterable.

TS2322TypeScript

TS2322: Type 'X' is not assignable to type 'Y'

You assigned a value whose type doesn’t match the declared type of the variable, property or return value.

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.

ClassCastExceptionJava

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

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

ERR_INVALID_ARG_TYPENode.js

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined

A Node API got an argument of the wrong type — usually undefined because an env var or config value is missing.

Unable to cast object of type.NET

System.InvalidCastException: Unable to cast object of type 'X' to type 'Y'

An explicit cast failed because the object’s runtime type isn’t the target type.

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.

Vite failed to resolve importReact

[vite] Internal server error: Failed to resolve import "x" from "src/App.jsx". Does the file exist?

Vite couldn’t find an imported file or package.

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.

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.

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…

TS2564TypeScript

TS2564: Property 'x' has no initializer and is not definitely assigned in the constructor

With strictPropertyInitialization on, a class property declared without ? or a default isn’t set in the constructor.

ReferenceErrorJavaScript

ReferenceError: x is not defined

Code refers to a variable or function name that doesn’t exist in the current 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).

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.

TS2571: Object is of type 'unknown'TypeScript

TypeScript: error TS2571: Object is of type 'unknown'.

You used a value typed `unknown` (often `catch (e)` or `JSON.parse` result) without narrowing.

TS2503: Cannot find namespace 'X'TypeScript

TypeScript: error TS2503: Cannot find namespace 'JSX'. / Cannot find namespace 'NodeJS'

Code references a global namespace (JSX, NodeJS, Express) that isn't declared — missing `@types` or lib settings.

TS2741: Property is missing in type but required in typeTypeScript

TypeScript: error TS2741: Property 'email' is missing in type '{ name: string; }' but required in type 'User'.

An object lacks one required property of the target type.

TS7053: Element implicitly has an 'any' type because expression of type 'string' can't be used to indexTypeScript

TypeScript: error TS7053: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{ a: number; }'

You index an object with a general `string` key, but its type only knows specific keys.

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.

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.

TS2614: Module has no exported member — did you mean to use 'import x from'TypeScript

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

You used a named import for something that's a default export (or reverse).

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…

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

Object.keys nullJavaScript

TypeError: Cannot convert undefined or null to object

Object.keys/entries/assign was called with undefined or null.

read-only propertyJavaScript

TypeError: Cannot assign to read only property 'x' of object

Code tried to modify a frozen object, a getter-only property, or immutable state.

TS2379/TS2375: exactOptionalPropertyTypes errorTypeScript

TypeScript: error TS2379: Argument of type '{ name: string; age: undefined; }' is not assignable to parameter of type 'User' with 'exactOptionalPropertyTypes: true'

With `exactOptionalPropertyTypes`, an optional property (`age?: number`) can be omitted but not explicitly set to `undefined`.

TS2349: This expression is not callableTypeScript

TypeScript: error TS2349: This expression is not callable. Type 'X' has no call signatures.

You called something TypeScript believes isn't a function (a union without compatible signatures, a module namespace, an object).

TS2367: This comparison appears to be unintentionalTypeScript

TypeScript: error TS2367: This comparison appears to be unintentional because the types '"a" | "b"' and '"c"' have no overlap.

You compare two values whose types can never be equal.

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.

already declaredJavaScript

SyntaxError: Identifier 'x' has already been declared

The same let/const/class name was declared twice in the same 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.

TS2403: Subsequent variable declarations must have the same typeTypeScript

TypeScript: error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'string', but here has type 'number'.

A `var` was redeclared with a different type (or global declarations conflict).