You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Node 20] ESM Loaders no longer have process.argv access #48577
Darwin MacBook-Pro-2.local 21.3.0 Darwin Kernel Version 21.3.0: Wed Jan 5 21:37:58 PST 2022; root:xnu-8019.80.24~20/RELEASE_ARM64_T6000 arm64
Subsystem
No response
What steps will reproduce the bug?
// foo.mjsconsole.log('argv:',process.argv);// bar.mjsconsole.log('hello from bar',process.version);
Run:
$ node --loader ./foo.mjs bar.mjs --hello=world
Output:
$ node --loader ./foo.mjs bar.mjs --hello=world
# (node:37260) ExperimentalWarning: Custom ESM Loaders is an experimental feature. This feature could change at any time# (Use `node --trace-warnings ...` to show where the warning was created)# argv: [# '/.../.volta/tools/image/node/18.12.1/bin/node',# '/.../bar.mjs',# '--hello=world'# ]# hello from bar v18.12.1
$ volta install node@20.2.0 # or any 20.x
$ node --loader ./foo.mjs bar.mjs --hello=world
# (node:37288) ExperimentalWarning: Custom ESM Loaders is an experimental feature and might change at any time# (Use `node --trace-warnings ...` to show where the warning was created)# argv: [ '/.../.volta/tools/image/node/20.2.0/bin/node' ]# hello from bar v20.2.0
How often does it reproduce? Is there a required condition?
Every time.
What is the expected behavior? Why is that the expected behavior?
Have access to process.argv
What do you see instead?
Doesn't receive any arguments beyond node path
Additional information
This is a breaking change introduced by #44710 & it was not listed in the PR notes.
Additionally, this breaking change wasn't listed in the 20.x Changelog
As indicated by #44710 (comment), the knowledge of this impact is assumed based on the user understanding (& awareness) of loaders now being off main thread.
As you are clearly aware: we are aware of the undesirable limitation and are already working to address it. This breaking change in the major release is a (known and documented) byproduct of the breaking change cited in the release for this experimental feature.
We believe we are close to resolving this. The design discussion is here: nodejs/loaders#147 and the draft implementation is here: #48439
This issue has been marked as stale due to 210 days of inactivity.
It will be automatically closed in 30 days if no further activity occurs. If this is still relevant, please leave a comment or update it to keep it open.
This issue has been marked as stale due to 90 days of inactivity.
It will be automatically closed in 30 days if no further activity occurs. If this is still relevant, please leave a comment or update it to keep it open.
This issue has been automatically closed after 30 days of inactivity following its stale status (no activity for a total of 120 days).
If this is still relevant, feel free to reopen it or leave a comment with additional details so we can continue the discussion.
Activity
tniessen commentedon Jun 29, 2023
cc @nodejs/loaders
JakobJingleheimer commentedon Jun 29, 2023
As you are clearly aware: we are aware of the undesirable limitation and are already working to address it. This breaking change in the major release is a (known and documented) byproduct of the breaking change cited in the release for this experimental feature.
We believe we are close to resolving this. The design discussion is here: nodejs/loaders#147 and the draft implementation is here: #48439
github-actions commentedon May 31, 2026
This issue has been marked as stale due to 210 days of inactivity.
It will be automatically closed in 30 days if no further activity occurs. If this is still relevant, please leave a comment or update it to keep it open.
lukeed commentedon Jun 3, 2026
/refresh
Still occurs with 24.16.0
github-actions commentedon Sep 3, 2026
This issue has been marked as stale due to 90 days of inactivity.
It will be automatically closed in 30 days if no further activity occurs. If this is still relevant, please leave a comment or update it to keep it open.
github-actions commentedon Oct 4, 2026
This issue has been automatically closed after 30 days of inactivity following its stale status (no activity for a total of 120 days).
If this is still relevant, feel free to reopen it or leave a comment with additional details so we can continue the discussion.