当前位置:网站首页>【Node】nvm 版本管理工具
【Node】nvm 版本管理工具
2022-07-05 07:07:00 【嘻嘻的妙妙屋】
nvm
概念
nvm 全名 node.js version management,顾名思义是一个nodejs的版本管理工具。通过它可以安装和切换不同版本的nodejs。
下载
打开网址我们可以看到有两个版本:
- nvm-noinstall.zip:绿色免安装版,但使用时需进行配置。
- nvm-setup.zip:安装版,推荐使用
下载安装完毕后,打开CMD,输入命令 nvm,安装成功则如下显示,可以看到里面列出了各种命令。
安装 / 管理 nodejs
- 查看本地安装的所有版本;有可选参数available,显示所有可下载的版本。
nvm list [available]
- 安装,命令中的版本号可自定义。
nvm install 16.15.0
- 使用特定版本
nvm use 16.15.0
- 卸载
nvm uninstall 16.15.0
补充
No installations recognized
如果在安装 nvm 之前已经安装了Node.js,安装之后,使用 nvm list 命令本应该会列出之前已经安装的版本号,但却出现了 No installations recognized 提示,意为没有安装的版本。
网上说是因为在安装 nvm 之前要卸载已经安装的 node 版本,一定要卸载干净。我就不一样了,我懒得卸载,于是我通过 node -v 知道我自己本机的版本之后 nvm install 了一个一模一样的版本,这样它就能检测到了
然后你以为这就可以了?并不,我 nvm use 的时候发现它乱码了,网上又说用管理员模式运行 cmd 就可以,我试了还是不行,于是我乖乖的把 nvm 和 node 都卸载了,然后重新装了一次 nvm,在上面下载各种版本的 node,就可以了,emmm,人还是不能太懒
设置国内镜像
在 nvm install 时下载太慢,可以设置 nvm 国内镜像:
阿里云
# 设置npm_mirror:
nvm npm_mirror https://npmmirror.com/mirrors/npm/
# 设置node_mirror:
nvm node_mirror https://npmmirror.com/mirrors/node/
腾讯云
# 设置npm_mirror:
nvm npm_mirror http://mirrors.cloud.tencent.com/npm/
# 设置node_mirror:
nvm node_mirror http://mirrors.cloud.tencent.com/nodejs-release/
然后就可以体验飞起来的感觉了!
边栏推荐
- Concurrent programming - how to interrupt / stop a running thread?
- PHY驱动调试之 --- MDIO/MDC接口22号和45号条款(一)
- Mipi interface, DVP interface and CSI interface of camera
- [OBS] x264 Code: "buffer_size“
- MySQL setting trigger problem
- Utf8 encoding
- testing framework
- SD_CMD_RECEIVE_SHIFT_REGISTER
- Rehabilitation type force deduction brush question notes D1
- Preemption of CFS scheduling
猜你喜欢
![[algorithm post interview] interview questions of a small factory](/img/62/6e330b1eba38f2dc67b21a10f0e2a8.jpg)
[algorithm post interview] interview questions of a small factory

cgroup_ memcg

Ros2 - configuration development environment (V)
![[untitled]](/img/d5/2ac2b15818cf66c241e307c6723d50.jpg)
[untitled]

Orin installs CUDA environment

ROS2——安装ROS2(三)

Concurrent programming - deadlock troubleshooting and handling

ROS2——node节点(七)

1290_ Implementation analysis of prvtaskistasksuspended() interface in FreeRTOS

IPage can display data normally, but total is always equal to 0
随机推荐
SD_CMD_RECEIVE_SHIFT_REGISTER
SRE核心体系了解
Now there are HTML files and MVC made with vs (connected to the database). How can they be connected?
Mutual transformation between two-dimensional array and sparse array (sparse matrix)
The differences and connections among cookies, sessions, JWT, and tokens
ROS2——topic话题(八)
Ros2 - Service Service (IX)
Ros2 - configuration development environment (V)
Concurrent programming - how to interrupt / stop a running thread?
Use the Paping tool to detect TCP port connectivity
. Net core stepping on the pit practice
What is linting
new和malloc的区别
Error: “MountVolume.SetUp failed for volume pvc 故障处理
Written examination notes
Executealways of unity is replacing executeineditmode
【obs】x264编码:“buffer_size“
SOC_SD_CMD_FSM
逻辑结构与物理结构
kata container