Skip to content

Instantly share code, notes, and snippets.

@LeeDDHH
Last active September 9, 2021 05:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LeeDDHH/e0eb75f87f48cd5c5a613a692c66ac78 to your computer and use it in GitHub Desktop.
Save LeeDDHH/e0eb75f87f48cd5c5a613a692c66ac78 to your computer and use it in GitHub Desktop.
tsconfig設定時のあれこれ

静的解析時に表示される日本語のエラーを英語で見たいとき


tsconfig.json を初期化して生成したい場合

  • npx tsc --init

tsconfigのオプションのドキュメント


エラー発生時の対応

tsconfig.json で入力が見つかりませんでした。指定された 'include' パスは '["**/*"]' で、'exclude' パスは '["node_modules"]' でした。

原因

tsconfig.json が置かれたプロジェクト内に .ts ファイルがなくて表示される

対応

  • .ts ファイルを生成する
  • もし、 include を指定しているのであれば、 include 内で .ts ファイルを生成する
  • 生成してもIDE内でエラーが表示されたままになる場合は、IDEを再起動する

参考


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment