-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
Rename binary that supports ESM to node2 #42469
Comments
I'm not sure I understand the ask, even if we remove support for ESM and/or add a |
If I understand the ask, it's for |
also strong -1 on this. |
Is there an issue with passing a CLI flag to the node binary or adding a package.json with |
I'm building an application to run AWS style lambdas locally with support for multiple languages. When the user specifies their python file they choose python2 or python3. When the user specifies their nodejs javascript file they specify node12 / 14 / 16 etc. I then try to execute said nodejs file as a commonjs file by using My customer is confused their nodejs file written in ESM does not work with my application, this is because ESM is a breaking change and they should have been forced to choose node or node2 to decide whether they want me to load a commonjs or esm program for local exection and AWS Lambda emulation. Alternatively, if I can require an ESM file then that would also not be a breaking change. |
cpython (which is what I assume you're referring to) releases aren't named python2 or python3, that's done by distro packaging people (although by python foundation recommendation), and they do that because of backward compat (modifying old python scripts to use |
You could modify the input format to allow users to encode the module type and run the js file accordingly. |
Alternatively you could use |
There has been no activity on this feature request for 5 months and it is unlikely to be implemented. It will be closed 6 months after the last non-automated comment. For more information on how the project manages feature requests, please consult the feature request management document. |
There has been no activity on this feature request and it is being closed. If you feel closing this issue is not the right thing to do, please leave a comment. For more information on how the project manages feature requests, please consult the feature request management document. |
What is the problem this feature will solve?
I'm currently using nodejs with
require
and commonjs,I cannot require an
.js
file that uses ESM and it's a terrible user experience.What is the feature you are proposing to solve the problem?
Can we remove ESM support from
node
and make anode2
binary that supports ESM ?What alternatives have you considered?
Add the ability to require an ESM module.
The text was updated successfully, but these errors were encountered: