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

ES modules support? #49

Open
dandv opened this issue Nov 14, 2019 · 1 comment
Open

ES modules support? #49

dandv opened this issue Nov 14, 2019 · 1 comment

Comments

@dandv
Copy link

dandv commented Nov 14, 2019

Running why-is-node-running myscript.mjs produces

> internal/modules/cjs/loader.js:1007
  throw new ERR_REQUIRE_ESM(filename);
  ^

Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: myscript.mjs

ES Modules support has just landed.

@mafintosh
Copy link
Owner

Prob needs to use import instead require for mjs. Feel free to send a PR

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