Skip to content

esm: fix imports from non-file module

Calling fileURLToPath on a possibly non-file URL throws. Converting to a path is not necessary anyway, as it's already common to see a URL in error messages rather than a path.

Fixes: https://github.com/nodejs/node/issues/42860

Merge request reports

Loading