Install NVM Management Multi-version Nodejs

Source: Internet
Author: User

1. Introduction (What is NVM)

Node version manager, which installs and maintains multiple node versions on the machine

2, NVM temporary switch (temporarily switch version, only valid in the current terminal, the new open terminal is invalid. )

(1) If you have not installed NPM, please install NPM first

(2) Subsequent installation of NVM:

CD NVM
SOURCE nvm.sh
git clone https://github.com/creationix/nvm.git

(3) Check the NVM installation version

NVM--version

(4) Install the specified node version

NVM Install <version>

(5) Select the version to use

NVM use <version>

(6) Delete the specified version

NVM Install <version>

3, NVM Permanent switch (reference link: https://www.geekjc.com/post/58b4ee31c8c6ea16bd304460)

(1) Use Homebrew to install:

Brew Install NVM

(2) After the installation is complete, enter the following line directly

" Source $ (Brew--prefix NVM)/nvm.sh " >>. Bash_profile

(3) Re-source your. Bash_profile to let the setting take effect

. ~/.bash_profile

(4) Install the specified node version

NVM Install <version>

(5) After the installation is complete, use NVM to switch versions

NVM use--delete-prefix <version> (example: NVM use--delete-prefix v4.6.2)

Install NVM Management Multi-version Nodejs

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.