V8 require() of ES modules is not supported
See original GitHub issueWe 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:
- Created a year ago
- Reactions:4
- Comments:5
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I solved this problem by downgrading.
npm install --save-dev gulp-imagemin@7.1.0
Stay happy.
it’s work for me to. thanks