-
Notifications
You must be signed in to change notification settings - Fork 84
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
ERR_REQUIRE_ESM #143
Comments
You cannot use an ES module in CommonJS. Use an older version or migrate your script to ESM. |
I'm seeing the same error, and my own codebase is ESM. Probably the cause there is that |
cli-progress dependency of string-width still points the the common-js version main.mjs - import {SingleBar,Presets} from "cli-progress";
// create a new progress bar instance and use shades_classic theme
const bar1 = new SingleBar({}, Presets.shades_classic);
// start the progress bar with a total value of 200 and start value of 0
bar1.start(200, 0);
// update the current value in your application..
bar1.update(100);
// stop the progress bar
bar1.stop(); |
@AndiDittrich hm, your example works for me in a clean project, but in my own script (also very short...) I'm seeing the following warnings during installation, and the error in the OP when I run the script:
I don't have any build system, just an ESM file Sorry for the noise! The cause of my issue doesn't appear to be a cli-progress problem, anyway. |
I have the same issue. The issue stems from two packages needing different versions of I'm not quite sure how to fix it. Maybe someone has an idea. From the NPM / YARN side of things, it looks like this problem won't be resolved any time soon (npm/npm#5499) For anyone else who is stuck with this problem right now: You can use https://npmgraph.js.org to at least see which other package is conflicting with the dependency. |
maybe we can just drop the dependency. the use case is limited .. |
|
I got this error-message if I try to run a deployment-script, which use cli-progress:
Any Idea, how to fix this?
The text was updated successfully, but these errors were encountered: