ERR_REQUIRE_ASYNC_MODULE


稳定性: 1 - 实验性

在尝试 require() ES 模块 时,模块却是异步的。也就是说,它包含顶层 await。

【When trying to require() a ES Module, the module turns out to be asynchronous. That is, it contains top-level await.】

要查看顶层 await 出现的位置,请使用 --experimental-print-required-tla(这会在查找顶层 await 之前先执行模块)。

【To see where the top-level await is, use --experimental-print-required-tla (this would execute the modules before looking for the top-level awaits).】