title: Is there an equivalent to Python's virtualenv in nodejs?
body: <p>Consider Python right now:</p>
  
  <ul>
  <li>You can have a single instance of the interpreter, say, 2.7.</li>
  <li>You can install virtualenv, globally, and its wrappers (as long as you have permissions).</li>
  <li>You can create several Python environments and install global packages you'd need like Django.</li>
  <li>Once you activate the interpreter, you can run <code>django-admin.py</code> (a global command available in the environment) and create a django project.</li>
  <li>Once you have your Django project, you can run <code>python manage.py</code> to run a command in your project.</li>
  <li>Perhaps you can have <code>pundle</code> in your project to install packages that are project-specific and not environment-wide.</li>
  </ul>
  
  <p>With this, you can have a project with its packages, inside of an environment with certain wide-scoped packages providing their own command line to be executed. You have a <em>single interpreter</em> installed here, and *for the same interpreter you can install several different Django versions (you will need a different environment for each version, but on each one the python interpreter is aliased in).</p>
  
  <p>Now i would like to think about nodejs and something like react, cordova, sails, meteor... you have many options to pick one, as long as they provide a command line.</p>
  
  <ul>
  <li>I install nodejs the first time, and also install npm and nvm.</li>
  <li>I install a specific version of node with nvm. Perhaps I have to manually alias node to nodejs or viceversa due to many packages acting weird.</li>
  <li>Instead of Django I'd like to create a Cordova/Ionic application with a specific Cordova version, so I <code>npm install -g ionic</code> in a specific nvm-picked version.</li>
  <li>Equivalent to Pundle, <code>npm</code> has intrinsic support for my application.</li>
  <li>If I want to sun a specific command for my cordova version for my project I can run one like <a href="https://www.sitepoint.com/solve-global-npm-module-dependency-problem/" rel="noreferrer">npm run cordova -- build android</a> instead of <code>cordova build android</code>.</li>
  </ul>
  
  <p>But this brings me a problem: For the same node interpreter version I can have <em>only one global</em> cordova or ionic or whatever I want. This means: If I want to use a specific version of nodejs, and have two projects requiring different versions of the required command line, I cannot run a global command to create such projects. Example:</p>
  
  <blockquote>
    <p>$ nvm use mynodeversion
    $ ionic start myApp</p>
  </blockquote>
  
  <p>I will be using a specific version of ionic in that command, which will generate a that-version-specific boilerplate for my project. Assume the ionic version is x1.y1.z1.</p>
  
  <p>Now I want to create a project with ionic version x2.y2.z2. But if I try to do this:</p>
  
  <blockquote>
    <p>$ nvm use mynodeversion
    $ ionic start myApp</p>
  </blockquote>
  
  <p>I will generate it for version x1.y1.z1 for the same interpreter, regardless which ionic version is referenced in my package.json.</p>
  
  <p>In Python that is automatically solved with virtualenvs: you can have a specific Python interpreter, create many different environments with it, install different versions of your framework, one on each virtualenv, and generate different versions boilerplates for your projects, which will be compatible with the corresponding versions.</p>
  
  <p>My question is: How can I do the same with nodejs? Provided, but not limiting to, the given example (another example could occur with sails or react-native).</p>