ERR_REQUIRE_ESM error
See original GitHub issueMy webpack config is an esmodule, so because eslint-plugin-import-webpack is using require()
, I get:
Resolve error: Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: ./webpack.config.js require() of ES modules is not supported.
And things fail.
Any way you can support ESM webpack config files?
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
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 >Error [ERR_REQUIRE_ESM]: How to use es6 modules in ...
You have to add this line of code in your package.json file "type" : "module" You will be able to use imports statements...
Read more >ERR_REQUIRE_ESM - DEV Community
Once you update you package deps you may face with the error mentioned in this note title: Error [ERR_REQUIRE_ESM]: Must use import to...
Read more >Error ERR REQUIRE ESM | Must use import to load ES Module
Error ERR REQUIRE ESM | Must use import to load ES Module. 15,379 views15K views. Apr 2, 2021. 46. Dislike. Share. Save.
Read more >Error [ERR_REQUIRE_ESM]: Must use import to load ES ...
tools'; ^ Error [ERR_REQUIRE_ESM]: require() of ES Module ... changes to project to became full ESM, or accept the security issue :( ) ......
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
@kemaakpala no. Stick to CJS (or transpiled ESM) for many reasons, including this issue.
@ljharb is there anyway to get arround this, apart from having to revert my webpack config files.