Version
23.0.0
Platform
No response
Subsystem
No response
What steps will reproduce the bug?
// main.cjs
try {
require("./dep.mjs");
} catch {
require("./dep.mjs");
}
How often does it reproduce? Is there a required condition?
/
What is the expected behavior? Why is that the expected behavior?
It should throw ERR_REQUIRE_ASYNC_MODULE
What do you see instead?
It throws ERR_REQUIRE_CYCLE_MODULE
Additional information
Probably all the places that currently assert that a module is either not loaded or already evaluated should be changed to check that, the module is either not loaded, evaluated, or instantaited.
cc @joyeecheung
Version
23.0.0
Platform
No response
Subsystem
No response
What steps will reproduce the bug?
How often does it reproduce? Is there a required condition?
/
What is the expected behavior? Why is that the expected behavior?
It should throw
ERR_REQUIRE_ASYNC_MODULEWhat do you see instead?
It throws
ERR_REQUIRE_CYCLE_MODULEAdditional information
Probably all the places that currently assert that a module is either not loaded or already evaluated should be changed to check that, the module is either not loaded, evaluated, or instantaited.
cc @joyeecheung