Error map

TS2604: JSX element type does not have any construct or call signatures TypeScript: error TS2604: JSX element type 'Foo' does not have any construct or call signatures.

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.

TS2604: JSX element type does not have any construct or call signatures — TypeScript: error TS2604: JSX element type 'Foo' does not have any construct or call signatures. (TypeScript)TS2604: JSX…Objects are not valid as a React child — Error: Objects are not valid as a React child (React)Objects are not val…React must be in scope — ReferenceError: React is not defined / 'React' must be in scope when using JSX (React)React must be in sc…Functions not valid as child — Warning: Functions are not valid as a React child. This may happen if you return a Component instead of <Component /> from render. (React)Functions not valid…Nothing was returned from render — Error: Nothing was returned from render. This usually means a return statement is missing. (React)Nothing was returne…Invalid DOM property — Warning: Invalid DOM property `class`. Did you mean `className`? (React)Invalid DOM propertynon-boolean attribute — Warning: Received `true` for a non-boolean attribute `x`. (React)non-boolean attribu…Invalid hook call (duplicate React in Next.js) — Next.js: Error: Invalid hook call. Hooks can only be called inside of the body of a function component — Cannot read properties of null (reading 'useContext') (Next.js)Invalid hook call (…ERESOLVE: next requires react ^18 (peer dependency conflict) — npm: ERESOLVE unable to resolve dependency tree — Found: react@19.0.0 / Could not resolve dependency: peer react@"^18.2.0" from some-lib (Next.js)ERESOLVE: next requ…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…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…TS2349: This expression is not callable — TypeScript: error TS2349: This expression is not callable. Type 'X' has no call signatures. (TypeScript)TS2349: This expres…TS2503: Cannot find namespace 'X' — TypeScript: error TS2503: Cannot find namespace 'JSX'. / Cannot find namespace 'NodeJS' (TypeScript)TS2503: Cannot find…TypeError — TypeError: Cannot read properties of undefined (reading 'x') (JavaScript)TypeErrorToo 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 propReferenceError — ReferenceError: x is not defined (JavaScript)ReferenceErrorAdjacent JSX elements — Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>? (React)Adjacent JSX elemen…api_version_invalid — API Error: Invalid or unsupported API version (API)api_version_invalidElement 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…setState during render — Warning: Cannot update a component (`Parent`) while rendering a different component (`Child`) (React)setState during ren…Suspended synchronous input — Error: A component suspended while responding to synchronous input. (React)Suspended synchrono…TS17004: Cannot use JSX unless the '--jsx' flag is provided — TypeScript: error TS17004: Cannot use JSX unless the '--jsx' flag is provided. (TypeScript)TS17004: Cannot use…invalid selector — DOMException: Failed to execute 'querySelector' on 'Document': 'x' is not a valid selector (JavaScript)invalid selectorTarget container is not a DOM element — Error: createRoot(...): Target container is not a DOM element. (React)Target container is…[Vue warn]: Failed to locate Teleport target with selector — Vue: [Vue warn]: Failed to locate Teleport target with selector "#modal". Note the target element must exist before the component is mounted (Vue)[Vue warn]: Failed …key is not a prop — Warning: `key` is not a prop. Trying to access it will result in `undefined` being returned. (React)key is not a propAvoid mutating a prop directly — Vue: [Vue warn]: Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders (Vue)Avoid mutating a pr…Failed prop type: The prop href expects a string or object in <Link> — Next.js: Error: Failed prop type: The prop `href` expects a `string` or `object` in `<Link>`, but got `undefined` instead (Next.js)Failed prop type: T…ERESOLVE — npm ERR! code ERESOLVE — unable to resolve dependency tree (npm)ERESOLVEInvalid hook call — Error: Invalid hook call. Hooks can only be called inside of the body of a function component. (React)Invalid hook callreact-hooks/exhaustive-deps — React Hook useEffect has a missing dependency (react-hooks/exhaustive-deps) (React)react-hooks/exhaust…next build: JavaScript heap out of memory — Next.js: FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory (during next build) (Next.js)next build: JavaScr…next build: fetch failed ECONNREFUSED (build-time API) — Next.js: Error occurred prerendering page "/blog" TypeError: fetch failed { cause: Error: connect ECONNREFUSED 127.0.0.1:3000 } (Next.js)next build: fetch f…Conflicting app and page file was found — Next.js: ⨯ Conflicting app and page file was found, please remove the conflicting files to continue: "pages/index.tsx" - "app/page.tsx" (Next.js)Conflicting app and…TS1192: Module has no default export — TypeScript: error TS1192: Module '"./utils"' has no default export. (TypeScript)TS1192: Module has …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…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…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…TS2393: Duplicate function implementation — TypeScript: error TS2393: Duplicate function implementation. (TypeScript)TS2393: Duplicate f…TS2554: Expected N arguments, but got M — TypeScript: error TS2554: Expected 2 arguments, but got 1. (TypeScript)TS2554: Expected N …ERR_INVALID_ARG_TYPE — TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined (Node.js)ERR_INVALID_ARG_TYPETS7016 — 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)TS2304

Directly related (12)

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…

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.

Functions not valid as childReact

Warning: Functions are not valid as a React child. This may happen if you return a Component instead of <Component /> from render.

A function (usually a component itself) was rendered instead of calling/rendering it as an element.

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.

Invalid DOM propertyReact

Warning: Invalid DOM property `class`. Did you mean `className`?

HTML attribute names were used in JSX instead of their React/DOM property names.

non-boolean attributeReact

Warning: Received `true` for a non-boolean attribute `x`.

A boolean was passed to a DOM attribute that expects a string, or a custom prop leaked through to a DOM element.

Invalid hook call (duplicate React in Next.js)Next.js

Next.js: Error: Invalid hook call. Hooks can only be called inside of the body of a function component — Cannot read properties of null (reading 'useContext')

Two copies of React are loaded (or React/ReactDOM versions differ), so hooks can't find the active renderer.

ERESOLVE: next requires react ^18 (peer dependency conflict)Next.js

npm: ERESOLVE unable to resolve dependency tree — Found: react@19.0.0 / Could not resolve dependency: peer react@"^18.2.0" from some-lib

A package requires a React version different from the one installed with Next.js.

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.

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

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

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.

Two steps away (34)

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…

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.

ReferenceErrorJavaScript

ReferenceError: x is not defined

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

Adjacent JSX elementsReact

Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>?

A component returns two sibling JSX elements without a single parent.

api_version_invalidAPI

API Error: Invalid or unsupported API version

The API version you requested — in the URL, a header or the SDK config — doesn’t exist or has been retired.

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.

setState during renderReact

Warning: Cannot update a component (`Parent`) while rendering a different component (`Child`)

A child component updated a parent’s state during its render instead of in an effect or event handler.

Suspended synchronous inputReact

Error: A component suspended while responding to synchronous input.

A component suspended (lazy load or data fetch) during an update that wasn’t wrapped in a transition, and there is no Suspense bo…

TS17004: Cannot use JSX unless the '--jsx' flag is providedTypeScript

TypeScript: error TS17004: Cannot use JSX unless the '--jsx' flag is provided.

A `.tsx` file contains JSX but tsconfig has no `jsx` option.

invalid selectorJavaScript

DOMException: Failed to execute 'querySelector' on 'Document': 'x' is not a valid selector

The CSS selector string is invalid — often an ID starting with a digit or containing special characters.

Target container is not a DOM elementReact

Error: createRoot(...): Target container is not a DOM element.

The element passed to createRoot/render doesn’t exist when the script runs.

[Vue warn]: Failed to locate Teleport target with selectorVue

Vue: [Vue warn]: Failed to locate Teleport target with selector "#modal". Note the target element must exist before the component is mounted

`` can't find its target element when mounting.

key is not a propReact

Warning: `key` is not a prop. Trying to access it will result in `undefined` being returned.

A component tried to read props.key, which React reserves and never passes down.

Avoid mutating a prop directlyVue

Vue: [Vue warn]: Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders

A child component assigned to a prop. Props flow one way — the parent owns the value.

Failed prop type: The prop href expects a string or object in <Link>Next.js

Next.js: Error: Failed prop type: The prop `href` expects a `string` or `object` in `<Link>`, but got `undefined` instead

`` received `undefined` (or another invalid value), so Next.js can't build the link.

ERESOLVEnpm

npm ERR! code ERESOLVE — unable to resolve dependency tree

npm 7+ found conflicting peer dependency requirements and refuses to install a broken tree.

Invalid hook callReact

Error: Invalid hook call. Hooks can only be called inside of the body of a function component.

A hook ran outside a function component/custom hook, conditionally — or two copies of React are loaded.

react-hooks/exhaustive-depsReact

React Hook useEffect has a missing dependency (react-hooks/exhaustive-deps)

ESLint warns that the effect reads a value that isn’t in its dependency array, so it may use a stale value.

next build: JavaScript heap out of memoryNext.js

Next.js: FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory (during next build)

Node ran out of memory while building a large Next.js app (or on a small CI/Vercel runner).

next build: fetch failed ECONNREFUSED (build-time API)Next.js

Next.js: Error occurred prerendering page "/blog" TypeError: fetch failed { cause: Error: connect ECONNREFUSED 127.0.0.1:3000 }

During `next build` a page tried to fetch data from a server (often your own app or an API) that isn't running yet.

Conflicting app and page file was foundNext.js

Next.js: ⨯ Conflicting app and page file was found, please remove the conflicting files to continue: "pages/index.tsx" - "app/page.tsx"

The same URL is defined in both the `app` and `pages` directories.

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.

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…

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.

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.

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.

TS2554: Expected N arguments, but got MTypeScript

TypeScript: error TS2554: Expected 2 arguments, but got 1.

A call passes too few or too many arguments.

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.

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.