LoginSignup
10
2

More than 3 years have passed since last update.

VScodeでTSを使うと出るCannot use JSX unless the '--jsx' flag is provided. ts(17004)を解決する。

Posted at

はじめに

create-react-appを実行し、いざ開発を始めようとしたらこんなエラーが
Cannot use JSX unless the '--jsx' flag is provided. ts(17004)
なんぞこれ。

解決方法

どうやらVScodeでのTypeScriptのバージョンが違うらしい。
ということでTypeScriptのバージョンを変えてみる。

Ctrl+Shift+pで開き、TypeScript selectでバージョンを選択
スクリーンショット 2021-04-04 18.32.26.png

ここでバージョンを4.2.3に変更

スクリーンショット 2021-04-04 18.33.26.png

これでエラーが出なくなりました!
スクリーンショット 2021-04-04 18.34.17.png

10
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
10
2