Linux installs via NVM node__linux

Source: Internet
Author: User
Linux Installation NVM
curl-o-https://raw.githubusercontent.com/creationix/nvm/v0.31.1/install.sh | Bash

Or

wget-qo-https://raw.githubusercontent.com/creationix/nvm/v0.31.1/install.sh | Bash


And then

SOURCE ~/.BASHRC
Installing node
NVM Install stable #安装最新稳定版

OK Extra Notes

NVM Install stable #安装最新稳定版 node
NVM Install 4.2.2 #安装 version 4.2.2
NVM install 0.12.7 #安装 version 0.12.7 Special Note: The following module installation is for demonstration purposes only, not the need to install modules

NVM use 0 #切换至 0.12.7

npm install-g Mz-fis #安装 Mz-fis module to the global catalog, and the path to the installation is/users/< your username >/.nvm/versions/node/v0. 12.7/lib/mz-fis

NVM use 4 #切换至 4.2.2
npm install-g react-native-cli #安装 react-native-cli module to the global catalog, the path to completion is/use rs/< your username >/.nvm/versions/node/v4.2.2/lib/react-native-cli

NVM alias default 0.12.7 #设置默认 node version for 0.12.7 NVM Toggle Version

If your default node version (set by the NVM alias command) differs from the version required for your project, you can create a. nvmrc file in the project root directory or any of its parent directories, specifying the node version number used in the file, for example:

CD < project root >  #进入项目根目录
echo 4 >. NVMRC #添加. nvmrc file
nvm use #无需指定版本号, the version configured in the. nvmrc file is automatically used
node-v #查看 node is switched to the corresponding version

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.