Why IntelliJ Idea not auto compile TypeScript sources from project and not showed all errors?
Answered
Hellow!
My system: IntelliJ IDEA 2019.1.2 (Ultimate Edition)
I have several (*.ts) files in my project. There are code errors in these files, but the IDE does not show them until I open the file in the editor. That is, after launching the IDE there are no errors, but if you open the file in the editor, the system shows errors in this file.
Help me:
1) How to create a module containing only TypeScript and JavaScript files and oriented specifically to such files? (I did not find such a module in the list of creation templates)
2) How to make the IDE automatically check all the files in this module and immediately show the TypeScript files where there are errors?
Please sign in to leave a comment.
Same problem here. I would appreciate some help :)
It works in a similar way for Java, the errors aren't shown when the files haven't been opened in the editor or compiled.
"Show project errors" uses context of the current open file. Projects can have hundreds sub-projects and showing all errors for all sub-projects is very ineffective.
Sorry but this is very disappointing! I have the same problem here.
Lets say I open a TS project, open just a file with some type in it and change the name of one property manually. Now, everywhere this type is used, the code will no longer compile. The IDE shows: nothing. If I hit "Build Project": nothing is marked. If I go to the Typescript Console and manually recompile the whole project, the console will show the compile errors as text; the rest of the IDE (like the project tree) still shows: NOTHING.
By the the way: the IDE knows very well through indexing all the different places, my type is used: if I press ctrl+B on any property or type, it will show me all the places it is being used! It would be very easy in this situation to automatically figure out which other sources to recompile and mark.
I have had a lot of pushes lately that would break our CI builds because of similar situations, just because there was no way whatsoever for the IDE to show me, that there were still compile errors in my commit. How embarrassing!
@..., You can run inspections against your project to see all errors inside: https://i.imgur.com/GaAsc4R.png
Never understood that limitation of intellij. The developer should decide that. That is a thing which let's me think about going back to eclipse