question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

V8 require() of ES modules is not supported

See original GitHub issue

We have a custom build tool that used v7.1.0 but does not work with the M1 chip, same as https://github.com/sindresorhus/gulp-imagemin/issues/369.

Then we went to v8.0.0, then we got require() of ES modules is not supported error.

And because have to use commonjs to compile with another custom binary, so we can’t change to es module for compiling.

Could we get some solutions you may suggest?

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:4
  • Comments:5

github_iconTop GitHub Comments

4reactions
thealiyasarcommented, Jun 13, 2022

I solved this problem by downgrading.

npm install --save-dev gulp-imagemin@7.1.0

Stay happy.

0reactions
meacodescommented, Aug 14, 2022

I solved this problem by downgrading.

npm install --save-dev gulp-imagemin@7.1.0

Stay happy.

it’s work for me to. thanks

Read more comments on GitHub >

github_iconTop Results From Across the Web

require() of ES modules is not supported · Issue #77 - GitHub
Since eslint updated to v8.0.0, I get the following error: require() of ES modules is not supported. require() of ...
Read more >
Error [ERR_REQUIRE_ESM]: require() of ES Module not ...
The node-fetch latest version doesn't use the require() syntax to import the package. You need to go to your package.json and type
Read more >
Error [ERR_REQUIRE_ESM]: require() of ES Module not ...
The error [ERR_REQUIRE_ESM]: require() of ES Module not supported. Instead change the require of index.js to a dynamic import() which is available in...
Read more >
Modules: Packages | Node.js v19.3.0 Documentation
Expected formats include CommonJS, JSON, and native addons but not ES modules as require() doesn't support them. Always mutually exclusive with "import" ....
Read more >
JavaScript modules - MDN Web Docs
This guide gives you all you need to get started with JavaScript module ... browsers have started to support module functionality natively, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found