Skip to content

import not working the same with ts-node and tsc + node #786

Description

@bjg2

ts-node version v8.0.2
tsc version 3.3.3

Please take a look at ts-node-fail repo, there is a small repro.

If I execute

ts-node test.ts

while there are no transpiled js files (so there's no config.js) config.ts import is messed up and I get output:

hi from test!

If I execute

tsc test.ts
node test.js

import works as expected and I get full output

hi from config!
hi from test!

Am I using something wrong? Seems like ts-node just has the bad execution.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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