To live is to make the world better.

主選單

標籤彙整：node

Thanks all the users, developers and the contributors! We did a lot of things in 2015, though there are still many issues that waiting to be solved, we’ll keep working on it, at the end of year 2015 and the beginning of year 2016, let’s have a fast review of the changes and rising in cdnjs during 2015!

=> Appending source string to /home/peter/.bashrc => You currently have modules installed globally with npm. These will no => longer be linked to the active version of Node when you install a new node => with nvm; and they may (depending on how you construct your $PATH) => override the binaries of modules installed with nvm:

And you can use nvm use to change to the version you want, like this:$ nvm use 0.12

Now using node v0.12.3 (npm v2.9.1)

How to know current nodejs versions?$ nvm current

v0.10.38

How to list installed nodejs versions?$ nvm ls

-> v0.10.38 v0.11.16 v0.12.3 system

How to list the nodejs versions available?$ nvm ls-remote It’ll give a very long version list like above but longer and longer ….

run nvm without parameter will print you the usage, very easy to understand like this:

Node Version Manager

Usage: nvm help Show this message nvm –version Print out the latest released version of nvm nvm install [-s] Download and install a , [-s] from source. Uses .nvmrc if available nvm uninstall Uninstall a version nvm use Modify PATH to use . Uses .nvmrc if available nvm run [] Run with as arguments. Uses .nvmrc if available for nvm current Display currently activated version nvm ls List installed versions nvm ls List versions matching a given description nvm ls-remote List remote versions available for install nvm deactivate Undo effects of nvm on current shell nvm alias [] Show all aliases beginning with nvm alias Set an alias named pointing to nvm unalias Deletes the alias named nvm reinstall-packages Reinstall global npm packages contained in to current version nvm unload Unload nvm from shell nvm which [] Display path to installed node version. Uses .nvmrc if available

Example: nvm install v0.10.32 Install a specific version number nvm use 0.10 Use the latest available 0.10.x release nvm run 0.10.32 app.js Run app.js using node v0.10.32 nvm exec 0.10.32 node app.js Run node app.js with the PATH pointing to node v0.10.32 nvm alias default 0.10.32 Set default node version on a shell