You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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'
}
The Problem
We need to load ESM in VM by
import
, but currently, we got the following error messages:Related Issues
new vm.Script
nodejs/node#27387Investigation
We need to set
NODE_OPTIONS=--experimental-vm-modules
to enablevm.SourceTextModule
.The text was updated successfully, but these errors were encountered: