Node.js
Node.js require tried to load an ES module
Node.js rejected a require() call because the target module is an ES module and the current loading path is not compatible with it.
Node.js
Node.js rejected a require() call because the target module is an ES module and the current loading path is not compatible with it.
Observed message
Error [ERR_REQUIRE_ESM]: require() of ES Module not supported
Why it happens
How to fix it
Official reference
Node.js Errors: ERR_REQUIRE_ESMRelated errors
Explore more