microsoft / microsoft/TypeScript

[BUG] This JSX tag requires the module path 'react/jsx-runtime' to exist, but none could be found. Make sure you have types for the appropriate package installed.

Open
#61,756 10 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Needs More Info
Dominant language
Go
Stars
111k
Forks
14.3k
Avg merge
2d 4h
Merged PRs (30d)
132

Description

Does this issue occur when all extensions are disabled?: Yes

- VS Code Version: 1.100.23258
- OS Version: Linux x64 6.9.3-76060903-generic
- Chromium: 132.0.6834.210
- Node.js: 20.19.0
- V8: 13.2.152.41-electron.0

Steps to Reproduce:

1. Open a .tsx file in a solidjs project (probably any non-react project) and observe all JSX syntax triggers a typescript error masking other potential ts errors.

![Image](https://github.com/user-attachments/assets/6f0a27e7-6a98-490a-81b6-2d498eeb5f8f)

- 1.100 always happens and the error changed to `This JSX tag requires the module path 'react/jsx-runtime' to exist, but none could be found. Make sure you have types for the appropriate package installed.` See [merge](https://github.com/microsoft/vscode/pull/246738)

Prior versions showed up like this:

- 1.95.3
- 1.98.2.25078 it occasionally happened but the error was `"This JSX tag requires 'React' to be in scope, but it could not be found."`

![Image](https://github.com/user-attachments/assets/514c1b56-db76-4058-9679-0989feb6988b)

A work-around is appreacted!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the diagnostic in a .tsx file within a SolidJS project, with extensions disabled, and compare the behavior across the reported VS Code and TypeScript versions. Trace the JSX type-checking path that produces the react/jsx-runtime requirement; done means valid SolidJS JSX no longer receives this misleading diagnostic while other TypeScript errors remain visible.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.