title: Install programmatically a NPM package providing its version
body: <p>I found <a href="https://stackoverflow.com/a/15957574/1420197">how to install npm packages programmatically</a> and the code works fine:</p>
  
  <pre><code>var npm = require("npm");
  npm.load({
      loaded: false
  }, function (err) {
    // catch errors
    npm.commands.install(["my", "packages", "to", "install"], function (er, data) {
      // log the error or data
    });
    npm.on("log", function (message) {
      // log the progress of the installation
      console.log(message);
    });
  });
  </code></pre>
  
  <p>If I want to install the first version of <code>hello-world</code> package, how can I do this in the NodeJS side, using <code>npm</code> module?</p>
  
  <p>I know that I can use child process, but I want to choose the <code>npm</code> module solution.</p>