-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Module resolution: ESM-style namespace importing is broken #58817
Comments
Some weeks ago I couldn't be bothered anymore waiting for ESM in TS, so I fixed the build script myself: kungfooman@eec5f8d It's rather simple and works for my use cases, but YMMV. |
|
@fatcerberus Thank you, edited, the project has seemingly zero errors (no output), which is the error here. 😅 |
Copying the text from your repo (please put this in the issue next time):
This is a duplicate of #56366, fixed by #57133 for TS 5.5. Please try the RC or nightly, or write
Many, many, many reasons. See also #58419. |
Hey @jakebailey, thank you for the information and all the work you put into ESM (I wasn't aware of it at all, I apologize)!
So I could just fix it by Thank you again, very happy that this is fixed soon and that ESM is actively worked on. 🚀 |
Demo Repo
https://github.com/kungfooman/ts_esm_fail
Which of the following problems are you reporting?
Something else more complicated which I'll explain in more detail
Demonstrate the defect described above with a code sample.
Run
tsc --showConfig
and paste its output hereI have a
jsconfig.json
, fix your tool. Buttsc -p jsconfig.json
prints nothing (no errors).Run
tsc --traceResolution
and paste its output herePaste the
package.json
of the importing module, if it existsPaste the
package.json
of the target module, if it existsAny other comments can go here
I'm doing the most normal ESM-style namespace importing, which everyone would simply expect to work, even your own types think so:
However, for some reason TS still believes that it only has to ship non-ESM files. It's 2024, why?!
The text was updated successfully, but these errors were encountered: