ERR_REQUIRE_ASYNC_MODULE
稳定性: 1 - 实验性的
¥Stability: 1 - Experimental
尝试 require()
ES 模块 时,模块变为异步。也就是说,它包含顶层等待。
¥When trying to require()
a ES Module, the module turns out to be asynchronous.
That is, it contains top-level await.
要查看顶层等待在哪里,请使用 --experimental-print-required-tla
(这将在查找顶层等待之前执行模块)。
¥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).