ERR_REQUIRE_ASYNC_MODULE: why require() won't wait for you
Node throws ERR_REQUIRE_ASYNC_MODULE when require() hits an ESM module with top-level await in its graph. Here's the whole mechanism and the fix that holds up.
Node throws ERR_REQUIRE_ASYNC_MODULE when require() hits an ESM module with top-level await in its graph. Here's the whole mechanism and the fix that holds up.
Node's 'Error: Cannot find module' (MODULE_NOT_FOUND) explained frame by frame — why require() can't see your package and how to fix it for good.