-
Notifications
You must be signed in to change notification settings - Fork 147
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
Issue upgrading to 3.0.57 - "Must use import to load ES module" #498
Comments
Hi @chadxz! This is intended. Earlier versions of The easy fix would be to switch from I added a note to the tips section (it is a little light though). |
Thank you! That got things going again. I opted to rename the files back to |
Okay! Ya, sorry about that 😅 |
Thanks for the issue. I had the same issue today with Mocha and |
My hunch is that most using I think my doc note is a little light. If you or @chadxz have suggestions for a better warning I'm up for it. |
I am authoring code in Typescript and emitting it to both CommonJS ( My use case for Now, I see that
Regarding the error message, the most confusing thing was that it caused a breaking change in a patch update. At first I thought that I had a configuration issue with Maybe something like at the bottom of the README: " |
There's several ways to address this. As mentioned above you can always load a Update: Just to be clear the restriction is on You can see this in action by looking at how |
Thanks for the reply. I'll still try to recontact Mocha to land their PR adding support for |
Hello! My issue kind of walks the line between bug report and support request. Sorry if it is the latter, I can take to Stackoverflow if so.
I have been using esm with chadxz/awry and it's been working great for me. I use nyc and mocha for my tests, and have
--require esm
in my "mocha.opts" file. This configure has been working for me up to now.After upgrading to
esm@3.0.57
, I am now getting the following message when I try to run my tests.If i downgrade to
esm@3.0.56
it works fine. If I upgrade to anything past 3.0.56 it breaks.Steps to reproduce:
$ git clone https://github.com/chadxz/awry
$ npm i
$ mocha
The text was updated successfully, but these errors were encountered: