-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Exports in package.json don't work as expected in ESM #1
Comments
What node version are you using? That's just a warning, and I would expect the latest versions of node, if not now then very soon, to stop producing this warning. |
Node 23.6.1, current. This warning is problematic as it may crash mocha in some situations. |
Using the I'm confused why it would crash mocha - node issues experimental warnings all the time, especially using a non-LTS version of node. Either way, it can be suppressed with a number of methods, discussed in nodejs/node#55417 |
Actually, in node 23.6.1 running |
No experimental flag, no In fact, this problem has appeared with the 2.1.1 version of |
hmm, i can't reproduce it using import either. Are you using native (v2.1.1 of is-async-function is the first version using the async-function package, so it's expected that this behavior wouldn't occur with an older version - as for "nearly never", you can see from the linked issue that it happens quite a lot with this particular warning) |
I had made a small version confusion for node between my local and my docker env. In fact, in 23.6.1, the problem doesn't exist. But my docker env is still 23.3.0, and under that version, the warning is present. |
aha - so the warning disappears if you upgrade to the latest (a supported) version of node 23 :-) glad to hear it. |
Thank you for your time and your the help ! |
If you want more information about the context of the error in mocha, that's sill occurring even with node 23.6.1: import isAsyncFunction from 'is-async-function'; then
Interestingly, if I force the module to load |
That seems like an issue with tsx - That I suggest filing an issue on tsx about it. |
Thank you again for your help! |
CJS isn't ever going away, so I don't expect that will ever happen. |
Hello,
In an ESM and node context, this lib causes this warning. It's indirectly imported from
traverse
>typedarray.prototype.slice
>typed-array-byte-offset
>reflect.getprototypeof
>which-builtin-type
>is-async-function
in our setup.The
exports
field of the package.json is weird too :The text was updated successfully, but these errors were encountered: