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.

オープン
#61,756 コメント 10 件 リアクション 2 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

Needs More Info
主要言語
Go
スター
111k
フォーク
14.3k
平均マージ
2日 4時間
マージ済み PR(30日)
132

説明

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

  • 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

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

A work-around is appreacted!

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず、拡張機能を無効にした状態で SolidJS プロジェクト内の .tsx ファイルで診断を再現し、報告されている VS Code と TypeScript のバージョン間で動作を比較します。react/jsx-runtime の要求を生成する JSX の型チェック経路を追跡します。完了条件は、有効な SolidJS JSX がこの誤解を招く診断を受けなくなり、他の TypeScript エラーは引き続き表示されることです。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
typescript
領域
compilers
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。