Windows local deployment of Easy Mock (2) nvm installation of different nodejs versions and common commands for nvm


nvm installs different nodejs versions and nvm common commands)
Note: When deploying Easy Mock locally, you must install the Node.js 8.x version , which is why I choose nvm to manage the node version

First solve the problem of slow download speed of nvm and npm after installation

	为了防止nvm和安装后node的npm下载速度慢,修改nvm安装目录下的settings.txt文件,增加两行
  • node_mirror: https://npm.taobao.org/mirrors/node/
  • npm_mirror: https://npm.taobao.org/mirrors/npm/

Insert picture description here
Insert picture description here

Install node 8.17.0 version

	在cmd中执行命令 `nvm install 8.17.0`

Insert picture description here

Install node 12.18.2 version

	在cmd中执行命令 `nvm install 12.18.2`

Insert picture description here

View the current version of node

nvm lsAt this time* which version is in front of which version is used, the following I am at 12.18.2, that is, the node version of 12.18.2 is currently used
Insert picture description here

Switch current node version

Insert picture description here

nvm commonly used commands

nvm -v

View the current nvm version and how to use nvm
Insert picture description here

nvm install <version> [arch]

	安装version版本的node,version可以是具体的版本号或者是latest(代表最新版本的node),arch默认是64位的,如果是32位 记得加上32

npm uninstall <version>

	卸载version版本的node

npm use <version> [arch]

	使用哪一个版本的node

Guess you like

Origin blog.csdn.net/huangge1199/article/details/108157030