error TS5037 occurs when there are import/export in .ts files

There is duplicate execution of tsc, one is with options and the other is not.
The latter causes error TS5037 when compiling .ts files as module.
It seems that the duplicate appeared in the commit 0c5c889405.