-
-
Notifications
You must be signed in to change notification settings - Fork 135
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
Importing from esm in Node.js is broken in v2.1.0 #80
Comments
Fails for me too on node v16.4.2. Pinning [email protected] works. |
experiencing the same in 2.1.0 |
Same here. |
Same |
Same here---I had some trouble finding this thread, so here is another possible error message you can get, for the benefit of other Googlers:
|
- Upgrade eslint - Lock limiter to 2.0.1 (jhurliman/node-rate-limiter#80)
Same |
Fails on v14.18.3 too |
Same issue here. Having issues with node 16.13.2. As with others previously mentioned, pinning |
Hello! I struggling with the same error. I would be happy to help, but I'm not proficient in Node.js. Thanks :) |
@jhurliman, Can we please merge just-performance#4 and #92? Those two PRs will fix this issue (I'm trying to use this in my framework, and need this fix to be able to use it. 🙃). |
Friendly ping @jhurliman. |
friendly ping @jhurliman |
For anyone still waiting, limiter-es6-compat |
@sudiptosarkar thanks 🙏 |
@sudiptosarkar I am getting this error. May you please help with this? import {RateLimiter} from "limiter-es6-compat" |
@shuklaalok7, Can you please do the following?
Also, does it have the same problem with |
For those who are still blocked, you can try following code to use
|
I've worked around it by importing the CJS file explicitly.
It's ugly but it works. For some reason, node was importing the esm files and treating them to be CJS files. Looking forward to this being fixed. |
Ran into this myself. @Nazaire your workaround worked for me. Thank you for posting that. @jhurliman please let us know if you need help maintaining this project. I would be glad to help. |
Spoke too soon. @Nazaire's method doesn't work in a library (at least with yarn). Looks like I'll have to use |
It's a hack, but since the types are wrong, I used patch-package to strip this down to something that would work when installing locally.
|
I have a proposed fix in #96 if anyone wants to test it out before I merge |
@jhurliman are you planning to publish the fixed version to npm? |
Importing from esm in Node.js is broken in v2.1.0:
v2.0.1 was working.
The text was updated successfully, but these errors were encountered: