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

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

Open
5 of 6 tasks
ufr-scf opened this issue Jul 19, 2024 · 3 comments
Open
5 of 6 tasks

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

ufr-scf opened this issue Jul 19, 2024 · 3 comments
Labels
bug Something isn't working interop

Comments

@ufr-scf
Copy link

ufr-scf commented Jul 19, 2024

Acknowledgements

  • I read the documentation and searched existing issues to avoid duplicates
  • I understand this is a bug tracker and anything other than a proven bug will be closed
  • I understand this is a free project and relies on community contributions
  • I read and understood the Contribution guide

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:

  • What happened
  • What I expected
  • Error stack trace
  • Documentation links
  • Screenshots

Bugs are expected to be fixed by those affected by it

  • I'm interested in working on this issue

Compensating engineering work will speed up resolution and support the project

  • I'm willing to offer $10 for financial support
@ufr-scf ufr-scf added bug Something isn't working pending triage labels Jul 19, 2024
@privatenumber privatenumber changed the title Export forwarding does not work for enums in esm packages when used with tsconfig references CJS named import interop doesn't work from an ESM package Jul 19, 2024
@privatenumber
Copy link
Owner

privatenumber commented Jul 19, 2024

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

@ufr-scf
Copy link
Author

ufr-scf commented Jul 19, 2024

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
Copy link

vertti commented Nov 1, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working interop
Projects
None yet
Development

No branches or pull requests

3 participants