Skip to content

Cannot write file because it would be overwritten by multiple input files #433

@ninja-

Description

@ninja-

I keep having a problem where ts-node won't work with multi-module projects.
The local modules are linked using npm link.
They often reference each other so a dependency(npm link) chain may look like
A -> B -> C
(project's submodule depends on a "commons" module)
+
(project depends on "commons" module for type definitions etc.)
A -> C
But that's probably not the main cause on this problem?

This breaks developer experience very badly because I am unable to run unit tests with ts-node while developing, so I have to go every time $ npm run build $ mocha lib/tests/test_something.js etc...

TSError: ⨯ Unable to compile TypeScript
Cannot write file 'C:/Users/x/IdeaProjects/PROJECT/MODULE1/$$ts-node$$/SYMLINKED_SUBMODULE/lib/src/util/index.js' because it would be overwritten by multiple input files. (5056)

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