process exits silently with --experimental-modules and inexistent entry point #15732
Copy link
Copy link
Closed
Labels
esmIssues and PRs related to the ECMAScript Modules implementation.Issues and PRs related to the ECMAScript Modules implementation.
Description
Repro: node --experimental-modules xxx.mjs where xxx.mjs does not exist.
Expected: A module not found error with exit code of 1.
In 8.5.0, we had:
$ node --experimental-modules xxx.mjs
(node:15121) ExperimentalWarning: The ESM module loader is experimental.
Error: module /home/mzasso/test/abc/xxx.mjs not found
at module.exports (internal/loader/search.js:16:12)
at resolveRequestUrl (internal/loader/resolveRequestUrl.js:81:13)
at Loader.import (internal/loader/Loader.js:61:27)
at Function.Module._load (module.js:462:27)
at Function.Module.runMain (module.js:665:10)
at startup (bootstrap_node.js:201:16)
at bootstrap_node.js:626:3
Actual: Process exits with no error message and an exit code of 0.
- Version: 8.6.0
- Platform: Linux x64
- Subsystem: ESM
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
esmIssues and PRs related to the ECMAScript Modules implementation.Issues and PRs related to the ECMAScript Modules implementation.
Activity
evanlucas commentedon Oct 2, 2017
Interesting...on macOS, I see this:
v8.5.0
v8.6.0
So looks like something has definitely changed
targos commentedon Oct 2, 2017
It's caused by dce72c2. I'm looking into it.
module: fix main resolution and not found updates
module: fix main resolution and not found updates
module: fix main resolution and not found updates
module: fix main resolution and not found updates