Skip to content

Vite installs React 19 bsing TypeScript to by default, caureak with "Cannot find namespace 'JSX'" error #19995

Answered by hi-ogawa
Fsp30 asked this question in Q&A
Discussion options

You must be logged in to vote

Steps to reproduce:

  1. Run npm create vite@latest and choose the react-ts template.
  2. Complete the setup and install dependencies (npm install).
  3. Try creating a basic component with JSX.
  4. Observe the TypeScript error: Cannot find namespace 'JSX'.

I couldn't reproduce the issue.

(Btw, React 19 is stable, so Vite template should recommend it. If there's a 3rd package issue, then the issue should be raised on that side.)

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Fsp30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants
Converted from issue

This discussion was converted from issue #19994 on May 03, 2025 05:03.