8000 TypeError [ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING]: A dynamic import callback was not specified. · Issue #17 · huan/sidecar · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
TypeError [ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING]: A dynamic import callback was not specified. #17
Closed
@huan

Description

@huan

The Problem

We need to load ESM in VM by import, but currently, we got the following error messages:

TypeError [ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING]: A dynamic import callback was not specified.
    at exports.importModuleDynamicallyCallback (internal/process/esm_loader.js:34:9)
    at evalmachine.<anonymous>:2:28
    at evalmachine.<anonymous>:6:3
    at Script.runInContext (vm.js:142:18)
    at Script.runInNewContext (vm.js:147:17)
    at main (file:///home/huan/git/huan/sidecar/src/dump/t.ts:44:38) {
  code: 'ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING'
}

Related Issues

Investigation

We need to set NODE_OPTIONS=--experimental-vm-modules to enable vm.SourceTextModule.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0