Version
v20.12.2
Platform
Darwin eloy 23.5.0 Darwin Kernel Version 23.5.0: Wed May 1 20:12:58 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T6000 arm64
Subsystem
No response
What steps will reproduce the bug?
- cd to your home directory
npm init -y
- add
"type": "module" to the new package.json
- starting certain apps like Discord and zbirenbaum/copilot.lua will error/crash
How often does it reproduce? Is there a required condition?
constantly
What is the expected behavior? Why is that the expected behavior?
not to crash other programs?
What do you see instead?
seems those programs like Discord and nvim copilot are traversing up and finding a higher level package.json and panicking at runtime.
Additional information
zbirenbaum/copilot.lua#306
https://x.com/Hacksore/status/1790395583611474423
even got @Jarred-Sumner
https://x.com/jarredsumner/status/1790611334784278853
I'm hoping this issue can solve, "what are developers supposed to do to handle this"?
Is having an ESM package.json in your home directory forbidden by nodejs or is this an edge case that can be patched?
Version
v20.12.2
Platform
Subsystem
No response
What steps will reproduce the bug?
npm init -y"type": "module"to the newpackage.jsonHow often does it reproduce? Is there a required condition?
constantly
What is the expected behavior? Why is that the expected behavior?
not to crash other programs?
What do you see instead?
seems those programs like Discord and nvim copilot are traversing up and finding a higher level
package.jsonand panicking at runtime.Additional information
zbirenbaum/copilot.lua#306
https://x.com/Hacksore/status/1790395583611474423
even got @Jarred-Sumner
https://x.com/jarredsumner/status/1790611334784278853
I'm hoping this issue can solve, "what are developers supposed to do to handle this"?
Is having an ESM
package.jsonin your home directory forbidden by nodejs or is this an edge case that can be patched?