Error map
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 · layer 1, On your device
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.
Directly related (12)
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…).
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.
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"…
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.
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).
TypeScript: error TS2305: Module '"./utils"' has no exported member 'helper'.
You imported a named export that the module doesn't export.
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.
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).
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).
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.
TypeScript: error TS2420: Class 'Dog' incorrectly implements interface 'Animal'. Property 'speak' is missing in type 'Dog' but required in type 'Animal'
A class declared `implements X` doesn't provide every required member (or with matching types).
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).
Two steps away (36)
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.
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.
TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts"
Node tried to run a TypeScript file as ESM without a TypeScript loader.
npm WARN EBADENGINE Unsupported engine / The engine "node" is incompatible with this module
A package requires a different Node.js version than the one you’re running.
DeprecationWarning: The `punycode` module is deprecated (DEP0040)
A dependency imports Node’s built-in punycode module, deprecated since Node 21.
Error: Node Sass does not yet support your current environment
node-sass (deprecated) has no binary for your Node version/OS.
ReferenceError: x is not defined
Code refers to a variable or function name that doesn’t exist in the current scope.
Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client
An Express/Node handler tried to send a second response (or set headers) after one was already sent.
Error: Unhandled 'error' event (events.js / node:events)
An EventEmitter (stream, socket, child process, server) emitted 'error' and nothing listened for it, so Node crashed.
DeprecationWarning: Buffer() is deprecated due to security and usability issues (DEP0005)
Code (yours or a dependency) uses the deprecated new Buffer() constructor.
Jest: SyntaxError: Cannot use import statement outside a module (Jest encountered an unexpected token)
Jest tried to run untransformed ES module syntax — usually from a dependency in node_modules.
Next.js: Error [ERR_REQUIRE_ESM]: require() of ES Module next.config.js / SyntaxError: Unexpected token 'export'
The config file uses ESM syntax in a CommonJS context (or the reverse), so Node can't load it.
TS2339: Property 'x' does not exist on type 'Y'.
TypeScript’s type for the object doesn’t include that property.
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).
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.
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.
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…
TypeScript: error TS1192: Module '"./utils"' has no default export.
You used `import x from "./mod"` but the module only has named exports.
SyntaxError: Identifier 'x' has already been declared
The same let/const/class name was declared twice in the same scope.
ReferenceError: Cannot access 'x' before initialization
A let/const/class was used before its declaration line ran (temporal dead zone) — often a circular import.
TypeScript: error TS2300: Duplicate identifier 'Foo'.
The same name is declared twice in the same scope (or in merged global declarations).
TypeScript: error TS2531: Object is possibly 'null'.
You used a value that can be `null` without checking it first (strictNullChecks).
TypeScript: error TS2352: Conversion of type 'string' to type 'number' may be a mistake because neither type sufficiently overlaps with the other
A type assertion (`as`) between unrelated types was rejected.
TypeScript: error TS2416: Property 'render' in type 'Child' is not assignable to the same property in base type 'Base'
A subclass overrides a member with an incompatible type.
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.
TypeScript: error TS2393: Duplicate function implementation.
A function with the same name/signature is implemented more than once in the same scope.
TypeScript: error TS2554: Expected 2 arguments, but got 1.
A call passes too few or too many arguments.
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.
TypeScript: error TS1005: ';' expected.
The parser hit a syntax error — missing punctuation, mismatched brackets, or an unsupported syntax for your TypeScript version.
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…
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.
TypeScript: error TS2430: Interface 'B' incorrectly extends interface 'A'. Types of property 'x' are incompatible
An extending interface redefines a property with a type that isn't assignable to the base's.
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`.
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…).
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.
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.
Map another error
Popular: 500403400ORA-009331064Critical errorFileNotFoundException assemblyTypeError