美文网首页
(二)nodejs多版本并存

(二)nodejs多版本并存

作者: 走码人 | 来源:发表于2022-11-15 13:20 被阅读0次

    安装nvm

    注意如果已事先经安装了nodejs,先进行卸载

    #列出已经安装的版本
    nvm list
    
    #切换版本
    nvm use 版本号
    
    

    github下载安装文件

    https://github.com/coreybutler/nvm-windows/releases
    

    nvm 命令

    C:\Users\liu5>nvm h
    
    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.
    

    相关文章

      网友评论

          本文标题:(二)nodejs多版本并存

          本文链接:https://www.haomeiwen.com/subject/oyosxdtx.html