Why is IntelliJ not compiling TypeScript on save?

Viewed 973

The TypeScript plugin is installed for IntelliJ IDEA (v2020.1 EAP), but TypeScript files are not being compiled when I save them, despite having "Recompile on changes" checked:

enter image description here

I can manually run tsc -w, and everything compiles. Do I need to add a file watcher or something? Feels wrong, because the IDE knows what files I touched.

1 Answers

I had the same issue but it seems to be working now (using IntelliJ 2019.03).

  • I unchecked all "TypeScript Language Service" options, changed the TypeScript compiler from "Bundled" to a locally installed one, and then re-checked the "TypeScript Language Service" options. Also I changed compile scope to "All Places".
  • I started the compilation from the TypeScript Tool Window using "Compile All" instead of the tsconfig.json file.
  • I restarted the TypeScript Service using the corresponding button in the TypeScript Tool Window.

I am unsure which of these actions actually fixed the issue.

Related