Introduction and installation of nvm---kalrry

1. Introduction to nvm

nvm is a node version control tool;
at work, two or more different projects may be developed at the same time, and each project may depend on a different version of the NodeJS operating environment. In this case, maintaining multiple versions of node will It is a very troublesome thing, nvm is to solve this problem, he can easily switch between multiple node versions on the same device

Second, nvm download and installation

1. Download

GitHub download

Download icon content
Please add image description

Ali cloud disk download

2. Installation

  1. Uninstall node before installing
  2. Double-click the installation file to install, pay attention to determine the installation path of the nvm software and the installation location of node.js
  3. After the installation is complete, enter nvm -v in the cmd command line to check the version to confirm that the installation is successful
  4. (This step can be ignored) Find the installation directory of nvm, configure the software source address in setting.txt,
    and add these two lines of code later
node_mirror: https://npm.taobao.org/mirrors/node/
npm_mirror: https://npm.taobao.org/mirrors/npm/

Three, nvm use

Common commands

nvm off                     // 禁用node.js版本管理(不卸载任何东西)
nvm on                      // 启用node.js版本管理
nvm install <version>       // 安装node.js的命名 version是版本号 例如:nvm install 8.12.0
nvm uninstall <version>     // 卸载node.js是的命令,卸载指定版本的nodejs,当安装失败时卸载使用
nvm ls                      // 显示所有安装的node.js版本
nvm list available          // 显示可以安装的所有node.js的版本
nvm list                    // 列出已安装版本【米字符的即是当前node版本】
nvm use <version>           // 切换到使用指定的nodejs版本
nvm v                       // 显示nvm版本
nvm install stable          // 安装最新稳定版
nvm arch                    // 显示node是运行在32位还是64位

4. Reference

  1. reference
  2. reference

Guess you like

Origin blog.csdn.net/weixin_45406712/article/details/124043910