1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-29 16:30:56 -05:00
denoland-deno/tests/specs/run/require_esm/main.out
snek f9007d3386
feat: require(esm) (#25501)
implement require(esm) using `op_import_sync` from deno_core.

possible future changes:
- cts and mts
- replace Deno.core.evalContext to optimize esm syntax detection

Fixes: https://github.com/denoland/deno/issues/25487
2024-09-10 20:12:36 +00:00

13 lines
748 B
Text

[Module: null prototype] { sync_js: 1 }
[Module: null prototype] { sync_mjs: 1 }
error: Uncaught (in promise) Error: Top-level await is not allowed in synchronous evaluation
at loadESMFromCJS (node:module:[WILDCARD])
at Module._compile (node:module:[WILDCARD])
at Object.Module._extensions..js (node:module:[WILDCARD])
at Module.load (node:module:[WILDCARD])
at Function.Module._load (node:module:[WILDCARD])
at Module.require (node:module:[WILDCARD])
at require (node:module:[WILDCARD])
at Object.<anonymous> (file:[WILDCARD]/tests/specs/run/require_esm/main.cjs:[WILDCARD])
at Object.<anonymous> (file:[WILDCARD]/tests/specs/run/require_esm/main.cjs:[WILDCARD])
at Module._compile (node:module:[WILDCARD])