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
regression in 21.4.0 when using esm package #51081
How often does it reproduce? Is there a required condition?
always
What is the expected behavior? Why is that the expected behavior?
same as in v21.3.0
/workspaces/working/mocha/esm-test $ nvm use v21.3.0
Now using node v21.3.0 (npm v10.2.4)
/workspaces/working/mocha/esm-test $ node -r esm test.js
hello
What do you see instead?
content of esm.js is dumped to console for a TypeError
TypeError: Function.prototype.apply was called on undefined, which is a undefined and not a function
at node:internal/main/run_main_module:28:49
Node.js v21.4.0
This isn't really a bug. We changed some undocumented internals that esm relied on, knowing it would break. Anyone can fork esm to update it accordingly; reverting the change would break other things now.
Activity
targos commentedon Dec 7, 2023
This is from #50907
/cc @ronag @anonrig
Pin NodeTestVersion to 21.2.0 again
[EngSys][Test] Pin NodeTestVersion to 21.2.0 again (#28053)
Revert "fs: remove workaround for `esm` package"
yoroshikun commentedon May 6, 2024
This is also reproducible in node 22.x.x, 🙇 so revert needs to be applied there I think.
GeoffreyBooth commentedon May 6, 2024
This isn't really a bug. We changed some undocumented internals that
esmrelied on, knowing it would break. Anyone can forkesmto update it accordingly; reverting the change would break other things now.avivkeller commentedon Jul 16, 2024
Given @GeoffreyBooth's response, I've closed this as wontfix. If you disagree, feel free to reopen / leave a comment