Marvel-Site Marvel-Site
首页
  • Java

    • Java基础
    • Java进阶
    • Java容器
    • Java并发编程
    • Java虚拟机
  • 计算机基础

    • 数据结构与算法
    • 计算机网络
    • 操作系统
    • Linux
  • 框架|中间件

    • Spring
    • MySQL
    • Redis
    • MQ
    • Zookeeper
    • Git
  • 架构

    • 分布式
    • 高并发
    • 高可用
    • 架构
  • 框架

    • React
    • 其他
  • 实用工具
  • 安装配置

    • Linux
    • Windows
    • Mac
  • 开发工具

    • IDEA
    • VsCode
  • 关于
  • 收藏
  • 草稿
  • 索引

    • 分类
    • 标签
    • 归档
GitHub (opens new window)

Marvel

吾必当乘此羽葆盖车
首页
  • Java

    • Java基础
    • Java进阶
    • Java容器
    • Java并发编程
    • Java虚拟机
  • 计算机基础

    • 数据结构与算法
    • 计算机网络
    • 操作系统
    • Linux
  • 框架|中间件

    • Spring
    • MySQL
    • Redis
    • MQ
    • Zookeeper
    • Git
  • 架构

    • 分布式
    • 高并发
    • 高可用
    • 架构
  • 框架

    • React
    • 其他
  • 实用工具
  • 安装配置

    • Linux
    • Windows
    • Mac
  • 开发工具

    • IDEA
    • VsCode
  • 关于
  • 收藏
  • 草稿
  • 索引

    • 分类
    • 标签
    • 归档
GitHub (opens new window)
  • 安装配置

  • 实用工具

    • 书签同步助手
    • PicGo + Github + Typora搭建图床
    • nvm安装和使用
      • 1 nvm安装
      • 2 nvm配置
        • 配置镜像
      • 3 下载Node
      • 4 nvm常用命令
    • Wireshark抓包
  • 开发工具

  • 工具
  • 实用工具
Marvel
2022-07-16
目录

nvm安装和使用

# NVM安装和使用

# 1 nvm安装

步骤1:Github下载

步骤2:开始安装,需要设置安装目录

image-20220716002823424

步骤3:这里一定要是空文件夹或者不存在的文件夹,安装时会自动创建

image-20220716002743157

步骤4:测试安装是否成功,输入命令nvm -v。看到以下内容说明安装成功,下面显示了一些常用命令。

Running version 1.1.9.

Usage:

  nvm arch                     : Show if node is running in 32 or 64 bit mode.
  nvm current                  : Display active version.
  nvm install <version> [arch] : The version can be a specific version, "latest" for the latest current version, or "lts" for the
                                 most recent LTS version. Optionally specify whether to install the 32 or 64 bit version (defaults
                                 to system arch). Set [arch] to "all" to install 32 AND 64 bit versions.
                                 Add --insecure to the end of this command to bypass SSL validation of the remote download server.
  nvm list [available]         : List the node.js installations. Type "available" at the end to see what can be installed. Aliased as ls.
  nvm on                       : Enable node.js version management.
  nvm off                      : Disable node.js version management.
  nvm proxy [url]              : Set a proxy to use for downloads. Leave [url] blank to see the current proxy.
                                 Set [url] to "none" to remove the proxy.
  nvm node_mirror [url]        : Set the node mirror. Defaults to https://nodejs.org/dist/. Leave [url] blank to use default url.
  nvm npm_mirror [url]         : Set the npm mirror. Defaults to https://github.com/npm/cli/archive/. Leave [url] blank to default url.
  nvm uninstall <version>      : The version must be a specific version.
  nvm use [version] [arch]     : Switch to use the specified version. Optionally use "latest", "lts", or "newest".
                                 "newest" is the latest installed version. Optionally specify 32/64bit architecture.
                                 nvm use <arch> will continue using the selected version, but switch to 32/64 bit mode.
  nvm root [path]              : Set the directory where nvm should store different versions of node.js.
                                 If <path> is not set, the current root will be displayed.
  nvm version                  : Displays the current running version of nvm for Windows. Aliased as v.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24

# 2 nvm配置

# 配置镜像

下面设置镜像加速,打开nvm安装路径中的settings.txt配置文件

image-20220716003534856

在最下方添加两行配置:

node_mirror:https://npm.taobao.org/mirrors/node/
npm_mirror:https://npm.taobao.org/mirrors/npm/
1
2

# 3 下载Node

下面选择16.15.1版本进行安装

输入安装命令:nvm install 16.15.1,可以看到安装了node并且下载了该版本node对应版本的npm包。

image-20220716004254044

使用该版本:nvm use 16.15.1(这里需要使用管理员模式打开CMD)

image-20220716004637497

安装完成后看到nvm安装目录下出现了v16.15.1文件夹

image-20220716004415991

# 4 nvm常用命令

  • nvm list:查看当前已经安装的node版本
  • nvm use [version]:使用某版本
  • nvm install [version]:安装某版本
  • nvm on:开启node版本管理
  • nvm off:关闭node版本管理
编辑 (opens new window)
上次更新: 2022/07/16, 23:51:27
PicGo + Github + Typora搭建图床
Wireshark抓包

← PicGo + Github + Typora搭建图床 Wireshark抓包→

最近更新
01
位运算
05-21
02
二叉树
05-12
03
Spring三级缓存解决循环依赖
03-25
更多文章>
Theme by Vdoing | Copyright © 2022-2024 Marvel
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式