瞎几把前言:mac上能够用n来管理node版本,私觉得n很好用。家里的win7台式机一直没有安装过任何管理工具,今天来给家里电脑安装一下nvw-windows,一个用于windows系统的node版本工具。node
电脑系统:系统win7 64位:git
nvw-windows的官网:https://github.com/coreybutler/nvm-windows/releasesgithub
首先从官网下载安装包 https://github.com/coreybutler/nvm-windows/releases,我下了一个setup版本的,下下来是个压缩包,解压后里面是一个exe,安装方式就如同一个常见的exe安装包,双击运行便可:web
1.双击exe开始安装:npm
2.下面这一步:配置nvm的安装位置,任意一个你喜欢的位置均可以。windows
3.设置node的symlink文件夹位置。这个文件夹的名字必定不能含有中文或空格!ide
4.若是在安装nvm以前,电脑上就已经安装有node的,会看到以下图,询问你是否用nvm管理已经存在的node版本。必定要选‘是’,这个弹窗可能会出现好几回,都点是。工具
5.安装完成。看到以下图:url
使用管理员权限打开一个命令行。输入nvm v,会显示nvm的版本号,有则表示安装成功。spa
nvm arch [32|64]
: Show if node is running in 32 or 64 bit mode. Specify 32 or 64 to override the default architecture.nvm install <version> [arch]
: The version can be a node.js version or "latest" for the latest stable 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.nvm list [available]
: List the node.js installations. Type available
at the end to show a list of versions available for download.nvm on
: Enable node.js version management.nvm off
: Disable node.js version management (does not uninstall anything).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 uninstall <version>
: Uninstall a specific version.nvm use <version> [arch]
: Switch to use the specified version. Optionally specify 32/64bit architecture. nvm use <arch>
will continue using the selected version, but switch to 32/64 bit mode based on the value supplied to <arch>
. For information about using use
in a specific directory (or using .nvmrc
), please refer to issue #16.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.nvm node_mirror <node_mirror_url>
: Set the node mirror.People in China can use https://npm.taobao.org/mirrors/node/nvm npm_mirror <npm_mirror_url>
: Set the npm mirror.People in China can use https://npm.taobao.org/mirrors/npm/
好比安装8.9.3:
nvm install 8.9.3
好比使用8.9.3:
nvm use 8.9.3
nvm node_mirror https://npm.taobao.org/mirrors/node/
nvm npm_mirror https://npm.taobao.org/mirrors/npm/
nvm ls
nvm ls available
(一)、nvm use 出现exit status 1