如果你需要在 Windows 上便捷的对不同版本的 node.js 进行切换 ,而不是卸载一个版本才能安装另一个版本,那么 nvm-windows 恰好能够给你提供帮助。
安装
- 在安装版本管理器之前,首先要确保现有安装的 node.js 被完全清除,关于这一点你可以看看这里: 如何从 Windows 中完全删除 node.js。
- 请确保安装目录中不包含中文和空格。
在 Github 上 nvm-windows 的 发布页面 你可以轻松找到最新的安装程序。
下载安装完成后打开命令行并输入 nvm
,如果你能看到 nvm 当前版本号和所有的用法说明,就证明 nvm 已经安装成功,就像下边这样。
Running version 1.1.7.
Usage:
nvm arch : Show if node is running in 32 or 64 bit mode.
nvm install <version> [arch] : The version can be a node.js version or "latest" for the latest stable version.
Optionally specify whether to i