-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
Dynamic require of "enquirer" is not supported #631
Dynamic require of "enquirer" is not supported #631
Comments
Hey @queengooborg , Thanks for the heads up. If this is a problem with ESM, I will check it in a mock ESM package. I guess I currently only use the You can just use the |
Just encountered the same issue and can confirm that it seems to be an issue when using ESM (since it worked before, when using CJS). Your suggestion with the listr options |
Refs: listr2/listr2#631 Fixes: nodejs#603
…mport fix: esm dynamic import of enquirer
## [5.0.5](v5.0.4...v5.0.5) (2022-09-05) ### Bug Fixes * esm dynamic import of enquirer ([55bed0a](55bed0a)), closes [#631](#631)
🎉 This issue has been resolved in version 5.0.5 🎉 The release is available on: Your semantic-release bot 📦🚀 |
In a recent update to
listr2
(orenquirer
), I had noticed thattask.prompt
would now crash with an error saying that "Enquirer is a peer dependency that must be installed separately." This error had confused me, however, as I definitely had Enquirer installed. Instead, I did a bit of debugging to figure out what exactly the underlying error was, and found that there was an error dynamically importing Enquirer.I have a feeling this might have come from the recent v4 release, where ESM support was added, especially since our project is using ESM. We're temporarily solving this by calling
enquire.prompt
directly, but this seems to cause some rendering issues, so it's only a temporary fix.The text was updated successfully, but these errors were encountered: