Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
JeremyLoy opened this issue Oct 12, 2020 · 1 comment

Comments

@JeremyLoy
Copy link

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.

@JeremyLoy
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant