nvm命令-2023年6月29日

nvm是一款Node.js版本管理工具,用户可以方便地在不同版本间切换。安装时需注意避开含有中文的路径,不推荐安装在C盘。关键命令包括:查看当前版本(nvmcurrent),安装指定版本(nvminstall),列出已安装版本(nvmlist),切换使用版本(nvmuse)等。
摘要由CSDN通过智能技术生成

nvm命令-2023年6月29日


日期:2023年6月29日

  1. 下载安装。
    https://github.com/coreybutler/nvm-windows/releases
    按需下载安装:
    注意选择安装位置,不要有中文,且不建议安装到C盘。
    在这里插入图片描述
  2. 安装完成后,打开cmd命令行。输入
nvm -v
nvm /?

完成命令自学。
在这里插入图片描述

  nvm arch                     : Show if node is running in 32 or 64 bit mode.
  (翻译:查看当前node环境是版本,32位/64位)
 nvm current                  : Display active version.
  (翻译:查看当前正在运行的node版本)
 nvm debug                    : Check the NVM4W process for known problems (troubleshooter).
    (翻译:balabalabala)
 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.
  (翻译:安装指定版本nodejs。例如:nvm install LTS 64 表示默认安装最新稳定,64位版本)
 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.
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值