We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@types/react@v19+
@types/react-dom@v19+
I have a boilerplate project setup using tsup and react@v19...
tsup
react@v19
"dependencies": { "react": "^19.0.0", "react-dom": "^19.0.0" }, "devDependencies": { "@repo/eslint-config": "*", "@repo/release-it-config": "*", "@repo/typescript-config": "*", "@types/react": "18.3.14", "@types/react-dom": "18.3.2", "eslint": "^9.18.0", "tsup": "^8.3.5", "typescript": "^5.7.3" },
But, when I try to upgrade the @types/react and @types/react-dom, tsup throws a TS2503: Cannot find namespace 'JSX' error.
@types/react
@types/react-dom
TS2503: Cannot find namespace 'JSX'
... DTS Build start │ src/button.tsx(6,62): error TS2503: Cannot find namespace 'JSX'. │ │ Error: error occurred in dts build │ at Worker.<anonymous> (/Users/code/my-project/node_modules/tsup/dist/index.js:1541:26) │ at Worker.emit (node:events:524:28) │ at MessagePort.<anonymous> (node:internal/worker:267:53) │ at [nodejs.internal.kHybridDispatch] (node:internal/event_target:827:20) │ at MessagePort.<anonymous> (node:internal/per_context/messageport:23:28) │ DTS Build error │ npm error Lifecycle script `build` failed with error: │ npm error code 1 │ npm error path /Users/code/my-project/packages/lib │ npm error workspace [email protected] │ npm error location /Users/code/my-project/packages/lib │ npm error command failed │ npm error command sh -c tsup │ │ command finished with error: command (/Users/code/my-project/packages/lib) /Users/P2185561/.nvm/versions/node/v22.13.1/bin/npm run build exited (1)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I have a boilerplate project setup using
tsup
andreact@v19
...But, when I try to upgrade the
@types/react
and@types/react-dom
,tsup
throws aTS2503: Cannot find namespace 'JSX'
error.The text was updated successfully, but these errors were encountered: