软件开发定制使用nvm管理切换node版本

软件开发定制在不同的项目中有时候依赖的node软件开发定制版本不一致,软件开发定制需要安装多个node版本依赖进行管理,这时候就需要使用nvm进行node版本管理操作。

  1. 首先进行nvm包的下载,找到下面这个进行下载。

  2. 下载完成之后进行鼠标双击打开安装操作,直接nextnext操作。下面这一步一定要注意,有些文中说安装之前必须卸载之前安装的node,我安装时并没有卸载node,这一步很关键,就是安装nvm时选择安装node路径一定是你已经安装的node的文件路径。在后面安装进程中会询问是否把之前安装的node模块加入nvm管理之中,点击yes就可以了。

    安装完成之后在cmd命令行窗口进行nvm -v 操作会提示安装版本以及一大堆提示指令说明安装成功了。

  3. 安装成功以后我们就可以使用nvm安装node的其他版本,常见的指令如下:

 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

如果在使用nvm use [version]切换版本的过程中发现窗口提示错误如下:

那么就需要进行管理员权限运行cmd窗口,右键选择,然后进行同样的命令执行操作。

$  nvm use [version]
  • 1

注意使用nvm切换node版本使用完毕之后,启动其他项目有可能需要将node版本切换回去。

网站建设定制开发 软件系统开发定制 定制软件开发 软件开发定制 定制app开发 app开发定制 app开发定制公司 电商商城定制开发 定制小程序开发 定制开发小程序 客户管理系统开发定制 定制网站 定制开发 crm开发定制 开发公司 小程序开发定制 定制软件 收款定制开发 企业网站定制开发 定制化开发 android系统定制开发 定制小程序开发费用 定制设计 专注app软件定制开发 软件开发定制定制 知名网站建设定制 软件定制开发供应商 应用系统定制开发 软件系统定制开发 企业管理系统定制开发 系统定制开发