Use NVM for node multi-version management

Source: Internet
Author: User

NVM is similar to Python's virtualenv and Ruby's RVM.
The NVM (Node version manager,node multiple version manager) is a generic term that has many different implementations. Usually we say that NVM refers to HTTPS://GITHUB.COM/CREATIONIX/NVM or https://github.com/visionmedia/n. Both of these tools are written using the shell.

N

Personal feeling N is more concise, it has only one script file.

Installation

If you already have NPM installed, you can execute the command directly to install N:

$ npm install -g n

Or just get the source code installed:

$ git clone https://github.com/visionmedia/n.git$ cd n$ [sudo] make install
Use

Run the n command directly to see all installed versions.

$ n

Run command N to install the specified version of node. Version can be stable (the latest stable version), latest (the latest version), or a specific version number.

$ n stableinstall : v0.10.24mkdir : /usr/local/n/versions/0.10.24fetch : http://nodejs.org/dist/v0.10.24/node-v0.10.24-linux-x64.tar.gz

The specified version will be installed in the/usr/local/n/versions directory.

Run command n RM to delete the specified version of node that has been installed.

Run command n use to select node with the specified version.

NVM installation
$ git clone https://github.com/creationix/nvm.git ~/.nvm$ source ~/.nvm/nvm.sh
Use

To view the installed version:

$ nvm ls

To view the versions that can be installed:

$ nvm ls-remote

Install the specified version:

$ nvm install <version>

The specified version will be installed directly in the directory where the NVM program is located.

Delete the specified version:

$ nvm uninstall <version>

Use the selected version:

$ nvm use <version>

Use NVM for node multi-version management

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.