privatenumber / tsx

⚡️ TypeScript Execute | The easiest way to run TypeScript in Node.js
https://tsx.is
MIT License
9.68k stars 153 forks source link

CJS named import interop doesn't work from an ESM package #614

Open ufr-scf opened 3 months ago

ufr-scf commented 3 months ago

Acknowledgements

Minimal reproduction URL

https://github.com/ufr-scf/tsx-missing-export

Problem & expected behavior (under 200 words)

Skip this section and let your reproduction do the talking...

But if you really need to explain, keep it under 200 words:

Bugs are expected to be fixed by those affected by it

Compensating engineering work will speed up resolution and support the project

privatenumber commented 3 months ago

Thanks for the report. This is a CommonJS interop bug, and unrelated to enums/tsconfig references.

ufr-scf commented 3 months ago

Thanks for your quick response. I'd be happy to try fixing the issue, but don't really know where to start. Do you have any tips/pointers?

vertti commented 6 days ago

I stumbled to the same exact issue. The strange thing also is that the import works in Nodejs 22.9.0, but not in 22.10.0 and 22.11.0.