TypeScript says a JSX element type has no construct or call signatures
JSX element type 'X' does not have any construct or call signaturesShort answer
TypeScript accepts a capitalised JSX tag only when the value is a function component or a class component. This error means the value in the tag is something else: an object, a module namespace, a string or a union containing one. Check what the identifier actually holds, and type dynamic tag names as intrinsic element names.
Fix it fast
1Find out which cause you have
Hover the identifier in your editor, or ask the compiler for its type. If the type is not a function or a class, that is the cause.
npx tsc --noEmit # then inspect the identifier named in the first error line2Match what you see, then jump to its fix
- 1
The error names an import that is not a component: import * as, a JSON file, or an object holding several components.The tag is an object or module namespace, not a componentFix - 2
const Tag = props.as ?? 'div' then <Tag>, and Tag is typed string.A tag name stored in a variable typed as stringFix - 3
'Promise<Element>' is not a valid JSX element, on a Server Component declared async.An async component with an older TypeScript or @types/reactFix
- 1
What does the error look like?
JSX element type 'X' does not have any construct or call signatures'Promise<Element>' is not a valid JSX element
Cause 1 of 3
The tag is an object or module namespace, not a component
1Check
TypeScript first tries to resolve a value-based tag as a function component, then as a class component. If both fail it reports the error.
grep -rn "import \* as" src app components2Fix
Import the actual component, with the right named or default import, instead of the namespace.
// wrong: Icons is a module namespace
import * as Icons from './icons'
const A = <Icons />
// right
import { HomeIcon } from './icons'
const B = <HomeIcon />3Verify
Run the type check; the error is gone.
npx tsc --noEmitConfirmed by typescriptlang.org
Cause 2 of 3
A tag name stored in a variable typed as string
1Check
Lowercase tags are intrinsic elements and are checked against JSX.IntrinsicElements. A plain string is neither that nor a function or class.
grep -rn "as?:\|tag:" src app components2Fix
Type the prop as a key of JSX.IntrinsicElements, or as a component type when it may be a component.
type Props = { as?: keyof React.JSX.IntrinsicElements; children: React.ReactNode }
export function Box({ as: Tag = 'div', children }: Props) {
return <Tag>{children}</Tag>
}3Verify
Type check the file; <Box as="section"> works and <Box as="nope"> is an error.
npx tsc --noEmitConfirmed by typescriptlang.org
Cause 3 of 3
An async component with an older TypeScript or @types/react
1Check
Before TypeScript 5.1 a tag was checked by comparing what the component returns with JSX.Element, which rejects a Promise. Next.js asks for TypeScript 5.1.3 or higher and @types/react 18.2.8 or higher.
npm ls typescript @types/react2Fix
Upgrade both packages. No change to the component is needed.
npm install -D typescript@latest @types/react@latest3Verify
Type check again.
npx tsc --noEmitConfirmed by nextjs.org
How do I stop it coming back?
- Prefer named exports for components, so a wrong import is a compile error at the import line.
- Type 'as' style props with keyof JSX.IntrinsicElements or a component type, never string.
- Keep typescript and @types/react current in the same pull request.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.
Which stack is behind this page?
Projects of mine built on the same technologies:
- TaxiDexMy own multi-tenant taxi dispatch SaaS: API, dispatcher portal, driver and passenger apps, and the servers underneath.
- QistLockA NestJS and React SaaS driving an Android Device Owner agent that locks financed phones when payments lapse.
- TaskvareA task and project-management suite: React on the web, Flutter on mobile, TypeScript underneath.
Related fixes
Web apps
TypeScript rejects a component that returns an array or other non-Element
Its return type 'Element[]' is not a valid JSX element.
TypeScript before 5.1 required every component to return JSX.Element or null, so arrays, strings and Promises were rejected even though React renders them.
2 causes, each with a fixWeb apps
Upgrading to Next.js 16: middleware becomes proxy, and the other things that break
Missing Required default.js for Parallel Route
Next.js 16 renames middleware.ts to proxy.ts and its exported function to proxy.
6 causes, each with a fixWeb apps
Type error after upgrading: params does not satisfy the PageProps constraint
Type '{ params: { id: string; }; }' does not satisfy the constraint 'PageProps'
Since Next.js 15, params and searchParams are Promises, not plain objects.
4 causes, each with a fixWeb apps
Importing useActionState from react fails in a Next.js project
The editor flags useActionState as not exported by react
useActionState exists only in React 19 and later.
4 causes, each with a fixWeb apps
TypeScript rejects a useRef ref passed to an input element
Type 'MutableRefObject<HTMLInputElement | undefined>' is not assignable to type 'LegacyRef<HTMLInputElement> | undefined'
The ref prop on a DOM element expects an object whose current value is the element or null.
2 causes, each with a fixWeb apps
TypeScript refuses JSX because the jsx option is not set
TS17004: Cannot use JSX unless the '--jsx' flag is provided.
TypeScript compiles JSX only when you name the file with a .tsx extension and enable the jsx compiler option.
2 causes, each with a fix