typescript-strict-plugin icon indicating copy to clipboard operation
typescript-strict-plugin copied to clipboard

tsc-strict seems to succeed resultless on out-of-memory failure

Open max-kahnt-keylight opened this issue 2 years ago • 0 comments

We need to run our typescript transpilation process with NODE_OPTIONS='--max-old-space-size=8192'. Subsequently running the typecheck has the following issue:

max@host master ~/code$ npx tsc-strict
Project does not contain any strict files.

is reported incorrectly whereas

max@host master ~/code$ NODE_OPTIONS='--max-old-space-size=8192' npx tsc-strict
🎯 Found 1062 strict files
🎉 All files passed

yields the correct result. I think typecheck should not succeed in the first place for out-of-memory errors and populate this error instead. Probably is related to tsc being called with the noEmit option. The terminal error response ($? evaluates to 1) is actually correct, but no obvious output is available.

Found by a colleague actually, not my credit.

max-kahnt-keylight avatar Sep 19 '22 07:09 max-kahnt-keylight