Closed
Description
Here's a simple ES module with top-level await:
console.log('before');
await new Promise(() => {});
console.log('after');
Executing it only prints before
and then exits with code 13
.
I don't know where the exit code is set, but it seems that we actually detect that the promise representing the module's execution never settles.
Could we emit/print a warning when it happens? Ideally it could contain the path to the problematic module.