Closed
Description
- Version: v15.9.0
- Platform: macOS Catalina 10.15.6
- Subsystem: VM
What steps will reproduce the bug?
Make file retu.js
.
const vm = require('vm');
const contextifiedSandbox = vm.createContext({ });
(async () => {
const bar = new vm.SourceTextModule(`19;`, { context: contextifiedSandbox });
async function linker(specifier, referencingModule) { }
await bar.link(linker);
const result = await bar.evaluate();
console.log("Result is: ", result);
})();
Run as node --experimental.vm.modules retu.js
What is the expected behavior?
According to the current state of the documentation I expect an output of Result is: 19
What do you see instead?
Output of: Result is: undefined