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

Cannot import typescript-only dependencies #9

Open
steelbrain opened this issue Jan 10, 2024 · 2 comments
Open

Cannot import typescript-only dependencies #9

steelbrain opened this issue Jan 10, 2024 · 2 comments

Comments

@steelbrain
Copy link

While this package does a good job within the project it's invoked from, if you are in a mono-repo and import a sibling package that is Typescript-only then it doesn't work.

I get the TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" for ... error for the dependency import because its src/index.ts has a TS extension.

I'm using tsimp through its own CLI, like tsimp ./bin/my-stack.ts

@vasyas
Copy link

vasyas commented Jan 26, 2024

Have the same issue.
With tsimp, I cannot import '.ts' file from the parent folder of the sub-project.
Compilation with tsc works ok.

@stuft2
Copy link

stuft2 commented Apr 24, 2024

Does it work if you use the node importer instead?

node --import=tsimp/import ./bin/my-stack.ts

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

3 participants