Version
22.6.0
Platform
Microsoft Windows NT 10.0.22631.0 x64
Subsystem
No response
What steps will reproduce the bug?
Create a .js file with the following code:
console.log("Hello world!");
export {};
and a package.json file with the following code:
in a directory with path length greater than 260 characters
How often does it reproduce? Is there a required condition?
Always
What is the expected behavior? Why is that the expected behavior?
Node should look at the closest package.json, see "type": "module", determine that the file is an ES module, and run it
What do you see instead?
Node is unable to read the package.json, defaults to CommonJS, and fails at export {}
Additional information
Showcase