Skip to content

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

Closed
@JeremyLoy

Description

@JeremyLoy

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions