-
-
Notifications
You must be signed in to change notification settings - Fork 127
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
Unable to import default exports with ESM #427
Comments
|
Yes it does, as it is needed for the param of the constructor. |
Not necessary. Here's a minimal reproduction: https://stackblitz.com/edit/stackblitz-starters-sykrfb |
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment has been minimized.
This comment has been minimized.
I've started investigating this, and so far found that the import happens fine if I specify Edit № 1: The Line 62 in aa2b639
Edit № 2: Ah, I see, it happens here: Lines 27 to 38 in aa2b639
Edit № 3: I'm starting to think that this might not actually be an issue with // example.js
module.exports = { default: 'example' }
// node
> await import('./example.js')
[Module: null prototype] { default: { default: 'example' } } |
Precheck
Problem
I would like to import a default export of a lib.
Unfortunately with tsx I couldn't do this:
I got this error:
Error: _zennv.default is not a function
Expected behavior
Working with default imports.
Minimal reproduction URL
https://stackblitz.com/edit/stackblitz-starters-wkqcy7?file=package.json,src%2Findex.ts,src%2Fenv.ts
Version
v4.6.0
Node.js version
v20.10.0
Package manager
pnpm
Operating system
Windows
Contributions
The text was updated successfully, but these errors were encountered: