Error map

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

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: Fil…ERR_REQUIRE_ESM — Error [ERR_REQUIRE_ESM]: require() of ES Module not supported (Node.js)ERR_REQUIRE_ESMERR_PACKAGE_PATH_NOT_EXPORTED — Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './x' is not defined by "exports" (Node.js)ERR_PACKAGE_PATH_NO…SyntaxError 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…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…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…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 …TS2578: Unused '@ts-expect-error' directive — TypeScript: error TS2578: Unused '@ts-expect-error' directive. (TypeScript)TS2578: Unused '@ts…TS2352: Conversion of type may be a mistake — TypeScript: error TS2352: Conversion of type 'string' to type 'number' may be a mistake because neither type sufficiently overlaps with the other (TypeScript)TS2352: Conversion …TS2686: 'React' refers to a UMD global, but the current file is a module — TypeScript: error TS2686: 'React' refers to a UMD global, but the current file is a module. Consider adding an import instead. (TypeScript)TS2686: 'React' ref…MODULE_NOT_FOUND — Error: Cannot find module 'x' (MODULE_NOT_FOUND) (Node.js)MODULE_NOT_FOUNDUnhandledPromiseRejection — Node.js: [UnhandledPromiseRejection] — This error originated either by throwing inside of an async function without a catch block (Node.js)UnhandledPromiseRej…ERR_UNKNOWN_FILE_EXTENSION — TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" (Node.js)ERR_UNKNOWN_FILE_EX…EBADENGINE — npm WARN EBADENGINE Unsupported engine / The engine "node" is incompatible with this module (Node.js)EBADENGINEDEP0040 — DeprecationWarning: The `punycode` module is deprecated (DEP0040) (Node.js)DEP0040node-sass — Error: Node Sass does not yet support your current environment (Node.js)node-sassReferenceError — ReferenceError: x is not defined (JavaScript)ReferenceErrorERR_HTTP_HEADERS_SENT — Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client (Node.js)ERR_HTTP_HEADERS_SE…Unhandled 'error' event — Error: Unhandled 'error' event (events.js / node:events) (Node.js)Unhandled 'error' e…DEP0005 — DeprecationWarning: Buffer() is deprecated due to security and usability issues (DEP0005) (Node.js)DEP0005Jest ESM — Jest: SyntaxError: Cannot use import statement outside a module (Jest encountered an unexpected token) (React)Jest ESMnext.config.js: ES Module / require error — Next.js: Error [ERR_REQUIRE_ESM]: require() of ES Module next.config.js / SyntaxError: Unexpected token 'export' (Next.js)next.config.js: ES …TS2339 — TS2339: Property 'x' does not exist on type 'Y'. (Node.js)TS2339TS2741: 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…TS2307 — TS2307: Cannot find module 'x' or its corresponding type declarations. (Node.js)TS2307TS2614: 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…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 propertyTS2322 — TS2322: Type 'X' is not assignable to type 'Y' (TypeScript)TS2322already declared — SyntaxError: Identifier 'x' has already been declared (JavaScript)already declaredTDZ — ReferenceError: Cannot access 'x' before initialization (JavaScript)TDZTS2300: Duplicate identifier — TypeScript: error TS2300: Duplicate identifier 'Foo'. (TypeScript)TS2300: Duplicate i…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…TS2420: Class incorrectly implements interface — TypeScript: error TS2420: Class 'Dog' incorrectly implements interface 'Animal'. Property 'speak' is missing in type 'Dog' but required in type 'Animal' (TypeScript)TS2420: Class incor…TS2345 — TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'. (Node.js)TS2345TS6133: 'x' is declared but its value is never read — TypeScript: error TS6133: 'x' is declared but its value is never read. (TypeScript)TS6133: 'x' is decl…TS1192: Module has no default export — TypeScript: error TS1192: Module '"./utils"' has no default export. (TypeScript)TS1192: Module has …TS2571: Object is of type 'unknown' — TypeScript: error TS2571: Object is of type 'unknown'. (TypeScript)TS2571: Object is o…TS2740: Type is missing the following properties — TypeScript: error TS2740: Type '{ name: string; }' is missing the following properties from type 'User': id, email (TypeScript)TS2740: Type is mis…TS18046: 'x' is of type 'unknown' — TypeScript: error TS18046: 'e' is of type 'unknown'. (catch variable) (TypeScript)TS18046: 'x' is of …Objects are not valid as a React child — Error: Objects are not valid as a React child (React)Objects are not val…Nothing was returned from render — Error: Nothing was returned from render. This usually means a return statement is missing. (React)Nothing was returne…React must be in scope — ReferenceError: React is not defined / 'React' must be in scope when using JSX (React)React must be in sc…

Directly related (12)

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

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.

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.

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

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.

TS2578: Unused '@ts-expect-error' directiveTypeScript

TypeScript: error TS2578: Unused '@ts-expect-error' directive.

A `// @ts-expect-error` comment suppresses nothing because the next line no longer has an error.

TS2352: Conversion of type may be a mistakeTypeScript

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.

TS2686: 'React' refers to a UMD global, but the current file is a moduleTypeScript

TypeScript: error TS2686: 'React' refers to a UMD global, but the current file is a module. Consider adding an import instead.

JSX compiled with `jsx: react` needs `React` imported, but the file doesn't import it.

Two steps away (36)

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.

UnhandledPromiseRejectionNode.js

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.

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.

EBADENGINENode.js

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.

DEP0040Node.js

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

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

node-sassNode.js

Error: Node Sass does not yet support your current environment

node-sass (deprecated) has no binary for your Node version/OS.

ReferenceErrorJavaScript

ReferenceError: x is not defined

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

ERR_HTTP_HEADERS_SENTNode.js

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.

Unhandled 'error' eventNode.js

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.

DEP0005Node.js

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

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

Jest ESMReact

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.config.js: ES Module / require errorNext.js

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.

TS2339Node.js

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

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

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.

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.

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…

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.

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.

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.

TS2300: Duplicate identifierTypeScript

TypeScript: error TS2300: Duplicate identifier 'Foo'.

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

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.

TS2420: Class incorrectly implements interfaceTypeScript

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

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.

TS6133: 'x' is declared but its value is never readTypeScript

TypeScript: error TS6133: 'x' is declared but its value is never read.

`noUnusedLocals`/`noUnusedParameters` flag an unused variable, import or parameter.

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.

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.

TS2740: Type is missing the following propertiesTypeScript

TypeScript: error TS2740: Type '{ name: string; }' is missing the following properties from type 'User': id, email

An object doesn't provide all required properties of the target type.

TS18046: 'x' is of type 'unknown'TypeScript

TypeScript: error TS18046: 'e' is of type 'unknown'. (catch variable)

TypeScript 4.9+ reports `unknown` values with their name; most often the `catch (e)` variable.

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…

Nothing was returned from renderReact

Error: Nothing was returned from render. This usually means a return statement is missing.

A component returned undefined (React 17 and earlier) — usually a missing return or a return followed by a line break.

React must be in scopeReact

ReferenceError: React is not defined / 'React' must be in scope when using JSX

JSX was compiled with the classic runtime, which needs React imported in every file.