Skip to content

Commit

Permalink
Merge pull request #795 from reybango/master
Browse files Browse the repository at this point in the history
Updated readme file to include --reinstall-packages-from
  • Loading branch information
ljharb committed Aug 4, 2015
2 parents 0713238 + d9662f1 commit ae1c488
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,27 @@ In place of a version pointer like "0.10", you can use the special default alias
nvm use stable
nvm run unstable --version

If you want to install a new version of Node.js and migrate npm packages from a previous version:

nvm install node --reinstall-packages-from=node

This will first use "nvm version node" to identify the current version you're migrating packages from. Then it resolves the new version to install from the remote server and installs it. Lastly, it runs "nvm reinstall-packages" to reinstall the npm packages from your prior version of Node to the new one.

You can also install and migrate npm packages from specific versions of Node like this:

nvm install v0.10.40 --reinstall-packages-from=0.10.39
nvm install v0.12.7 --reinstall-packages-from=0.12.6

If you want to install [io.js](https://github.com/iojs/io.js/):

nvm install iojs

If you want to install a new version of io.js and migrate npm packages from a previous version:

nvm install iojs --reinstall-packages-from=iojs

The same guidelines mentioned for migrating npm packages in Node.js are applicable to io.js.

If you want to use the system-installed version of node, you can use the special default alias "system":

nvm use system
Expand Down

0 comments on commit ae1c488

Please sign in to comment.