Skip to content
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

Error [ERR_REQUIRE_ESM]: require() of ES Module index.js not supported #54

Closed
orassayag opened this issue Jan 1, 2022 · 2 comments
Closed

Comments

@orassayag
Copy link

Getting:
Error [ERR_REQUIRE_ESM]: require() of ES Module C:\node_modules\log-update\index.js from C:\src\utils\files\log.utils.js not supported.
Instead change the require of index.js in C:\src\utils\files\log.utils.js to a dynamic import() which is available in all CommonJS modules.
courses\node_modules@babel\node\lib_babel-node.js:176:21) {
code: 'ERR_REQUIRE_ESM'
}
npm ERR! code 1
npm ERR! path C:\Web
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c babel-node src/scripts/initiate.script.js

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\AppData\Local\npm-cache_logs\2022-01-01T17_56_21_202Z-debug-0.log

Also opened a ticket in SO:
https://stackoverflow.com/questions/70550799/error-err-require-esm-require-of-es-module-index-js-not-supported

@sindresorhus
Copy link
Owner

https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c

@orassayag
Copy link
Author

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants