nestjs/typescript-starter

`tsbuildinfo` should be removed in `prebuild` - `incremental` flag can cause hard to pin down errors

JeremyLoy opened this issue · 1 comments

Not sure if this should be posted here or in nestjs/nest-cli

PR #124 introduced incremental: true to the tsc template.

The *.tsbuildinfo file, an artifact of the incremental build process, is not being removed by rimraf in prebuild, or by the nest cli itself.

Because prebuild removes the dist folder, but not build info file, tsc does not build all modules correctly. This can cause a very nondescript MODULE_NOT_FOUND error to be thrown by node when trying to find main.js, which will not exist for larger projects that take a few seconds to do a fresh compile.

Closing this, found out this is actually just an issue with my project, which used a slightly modified version of this starter and exhibits a bug in tsc itself

microsoft/TypeScript#30925