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

Closed
dandv opened this issue Nov 14, 2019 · 2 comments · Fixed by #67
Closed

ES modules support? #49

dandv opened this issue Nov 14, 2019 · 2 comments · Fixed by #67

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

@jonkoops
Copy link
Collaborator

I'll try and implement this in the next major version once all the bugs that are open for v2 are fixed.

jonkoops added a commit to jonkoops/why-is-node-running that referenced this issue Jul 5, 2024
jonkoops added a commit to jonkoops/why-is-node-running that referenced this issue Jul 5, 2024
jonkoops added a commit to jonkoops/why-is-node-running that referenced this issue Jul 5, 2024
jonkoops added a commit to jonkoops/why-is-node-running that referenced this issue Jul 5, 2024
jonkoops added a commit to jonkoops/why-is-node-running that referenced this issue Jul 8, 2024
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

Successfully merging a pull request may close this issue.

3 participants