一、nvm下载版本与安装
1.1 nvm的安装
![](https://img-blog.csdnimg.cn/20210127155804628.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L0R1Y2tkYW4=,size_16,color_FFFFFF,t_70#pic_center)
![](https://img-blog.csdnimg.cn/2021012715591550.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L0R1Y2tkYW4=,size_16,color_FFFFFF,t_70#pic_center)
1.2 nvm的安装成功之后的环境变量
![](https://img-blog.csdnimg.cn/20210127160829531.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L0R1Y2tkYW4=,size_16,color_FFFFFF,t_70#pic_center)
![](https://img-blog.csdnimg.cn/20210127160923708.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L0R1Y2tkYW4=,size_16,color_FFFFFF,t_70#pic_center)
1.3 nvm的安装成功之后的目录
![](https://img-blog.csdnimg.cn/20210127161003844.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L0R1Y2tkYW4=,size_16,color_FFFFFF,t_70#pic_center)
root: D:\H5\nvm
path: D:\H5\nodejs
node_mirror:http://npm.taobao.org/mirrors/node/
npm_mirror:http://npm.taobao.org/mirrors/npm/
安装node 8.11.3
![](https://img-blog.csdnimg.cn/20210127162235626.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L0R1Y2tkYW4=,size_16,color_FFFFFF,t_70#pic_center)
1.4 运行‘node -v’命令报错
如果运行‘node -v’命令系统提示‘拒绝访问’的话,那么很有可能是node下载的文件被损害。删除已有node版本,重新使用nvm命令安装即可。二、node与npm
在nvm安装完成之后,node与npm的命令行就可以正常使用。参考文章
安装nvm管理node版本+webstorm配置前端案例-nvm在windows下的安装配置