NVM 安装【NodeJs 版本管理工具,Windows】

官网下载

  • 下载地址
  • nvm-setup.zip 解压,管理员方式安装
  • 环境变量 系统变量 NVM_DIR_CACHE D:\installSoft\nvm-cache
  • 环境变量 系统变量 path %NVM_DIR_CACHE%

cmd 安装Node

# 查看可用的node版本 nvm list available
# 安装最新的NodeJs nvm install node
# 安装指定版本 nvm install 22.3.0
# 卸载指定版本 nvm uninstall 22.21.1
# 切换版本 nvm use 24.13.0
# 查看已安装版本 nvm ls
# 查看node版本 node -v 查看npm版本 npm -v

https://nodejs.org/dist/v24.11.1/node-v24.11.1-win-x64.zip

setting.txt 不好用,别用
node_mirror: https://npmmirror.com/mirrors/node/
npm_mirror: https://npmmirror.com/mirrors/npm/

npm config ls -l 查看配置
cache = "C:\\Users\\jeyar\\AppData\\Local\\npm-cache"
prefix = "D:\\installSoft\\nvm\\nodejs"
registry = "https://registry.npmjs.org/"

# 设置镜像(淘宝)
npm config set registry https://registry.npmmirror.com/
.npmrc 设置镜像(淘宝) ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/
C:\Users\jeyar\.npmrc

# 设置缓存
npm config set cache "D:\installSoft\nvm-cache\npm-cache" --global
npm config set prefix "D:\installSoft\nvm-cache\npm-global" --global
npm config get cache
npm config get prefix
环境变量 系统变量 path D:\installSoft\nvm-cache\npm-global
posted @ 2026-01-26 10:19  jeyar  阅读(0)  评论(0)    收藏  举报