Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

10.7.0 doc mistake: new vm.Module #21904

Closed
zombieyang opened this issue Jul 20, 2018 · 2 comments
Closed

10.7.0 doc mistake: new vm.Module #21904

zombieyang opened this issue Jul 20, 2018 · 2 comments
Labels
doc Issues and PRs related to the documentations. good first issue Issues that are suitable for first-time contributors. vm Issues and PRs related to the vm subsystem.

Comments

@zombieyang
Copy link

  // Since module has no dependencies, the linker function will never be called.
  await module.link(() => {});
  module.initialize();
  await module.evaluate();

the method initialize does not exist. May be instantiate is correct.

@ChALkeR ChALkeR added the doc Issues and PRs related to the documentations. label Jul 20, 2018
@devsnek devsnek added the vm Issues and PRs related to the vm subsystem. label Jul 20, 2018
@devsnek
Copy link
Member

devsnek commented Jul 20, 2018

yeah, it should be module.instantiate();. if anyone wants to take this: https://github.com/nodejs/node/blob/master/doc/api/vm.md

@devsnek devsnek added the good first issue Issues that are suitable for first-time contributors. label Jul 20, 2018
@sagirk
Copy link
Contributor

sagirk commented Jul 20, 2018

I'm taking this up.

@devsnek devsnek closed this as completed Jul 20, 2018
sagirk added a commit to sagirk/node that referenced this issue Jul 20, 2018
In the VM docs, under section `Constructor: new vm.Module`, the code
example incorrectly uses `module.initialize()`.

Change it to the correct method `module.instantiate()`.

Fixes: nodejs#21904
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues and PRs related to the documentations. good first issue Issues that are suitable for first-time contributors. vm Issues and PRs related to the vm subsystem.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants