A node.js version management utility for Windows. Ironically written in Go.
The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:
The npm/Microsoft/Google recommended Node.js version manager for Windows.
Like this project? Let people know with a tweet.
Better yet, click the "Sponsor" button at the top of this screen. Patreon sponsors will receive patron-only update posts.
(2019-09-06) I am actively working on new Github actions to build releases. There are several great contributions in master (which contains the to-be-released 1.1.8 version), but I've always had to build these by hand.... and as many of you have noticed, my time has been extremely limited for quite awhile. The time consuming part is preparing the NSIS build, but once that is automated, it should be significantly easier for people to contribute changes and actually see them released.
Older notices have moved to the notices wiki entry.
Please see the Common Issues page before posting an issue.
Manage multiple installations of node.js on a Windows computer.
There are situations where the ability to switch between different versions of Node.js can be very useful. For example, if you want to test a module you're developing with the latest bleeding edge version without uninstalling the stable version of node, this utility can help.
Please note, you need to uninstall any existing versions of node.js before installing NVM for Windows. Also delete any existing nodejs installation directories (e.g., "C:\Program Files\nodejs") that might remain. NVM's generated symlink will not overwrite an existing (even empty) installation directory.
You should also delete the existing npm install location (e.g. "C:\Users\<user>\AppData\Roaming\npm"), so that the nvm install location will be correctly used instead. Backup the global
), if you have some important settings there, or copy the settings to the user config
nvm-windows comes with an installer (and uninstaller), because getting it should be easy.
After install, reinstalling global utilities (e.g. gulp) will have to be done for each installed version of node:
nvm use 4.4.0 npm install gulp-cli -g nvm use 0.10.33 npm install gulp-cli -g
To upgrade nvm-windows, run the new installer. It will safely overwrite the files it needs to update without touching your node.js installations. Make sure you use the same installation and symlink folder. If you originally installed to the default locations, you just need to click "next" on each window until it finishes.
nvm-windows runs in an Admin shell. You'll need to start
or Command Prompt as Administrator to use nvm-windows
NVM for Windows is a command line tool. Simply type
nvm arch [32|64]
nvm install <version> [arch]</version>
: 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
nvm list [available]
: List the node.js installations. Type
nvm proxy [url]
: Set a proxy to use for downloads. Leave
blank to see the current proxy. Set
nvm uninstall <version></version>
nvm use <version> [arch]</version>
: Switch to use the specified version. Optionally specify 32/64bit architecture.
nvm use <arch></arch>
will continue using the selected version, but switch to 32/64 bit mode based on the value supplied to
. For information about using
in a specific directory (or using
nvm root <path></path>
: Set the directory where nvm should store different versions of node.js. If
nvm node\_mirror <node_mirror_url></node_mirror_url>
nvm npm\_mirror <npm_mirror_url></npm_mirror_url>
: Set the npm mirror.People in China can use https://npm.taobao.org/mirrors/npm/
Please note that any global npm modules you may have installed are not shared between the various versions of node.js you have installed. Additionally, some npm modules may not be supported in the version of node you're using, so be aware of your environment as you work.
Users have reported some problems using antivirus, specifically McAfee. It appears the antivirus software is manipulating access to the VBScript engine. See issue #133 for details and resolution.
npm i -g yarn
See the wiki for details.
go get github.com/blang/semver
go get github.com/olekukonko/tablewriter
directory for generated setup program.
There are several version managers for node.js. Tools like nvm and nonly run on Mac OSX and Linux. Windows users are left in the cold? No. nvmw and nodistare both designed for Windows. So, why another version manager for Windows?
The architecture of most node version managers for Windows rely on
files, which do some clever tricks to set or mimic environment variables. Some of them use node itself (once it's downloaded), which is admirable, but prone to problems. Right around node 0.10.30, the installation structure changed a little, causing some of these to just stop working with anything new.
Additionally, some users struggle to install these modules since it requires a little more knowledge of node's installation structure. I believe if it were easier for people to switch between versions, people might take the time to test their code on back and future versions... which is just good practice.
First and foremost, this version of nvm has no dependency on node. It's written in Go, which is a much more structured approach than hacking around a limited
file. It does not rely on having an existing node installation. Go offers the ability to create a Mac/Linux version on the same code base. In fact, this is already underway.
The control mechanism is also quite different. There are two general ways to support multiple node installations with hot switching capabilities. The first is to modify the system
any time you switch versions, or bypass it by using a
file to mimic the node executable and redirect accordingly. This always seemed a little hackish to me, and there are some quirks as a result of this implementation.
The second option is to use a symlink. This concept requires putting the symlink in the system
, then updating its target to the node installation directory you want to use. This is a straightforward approach, and seems to be what people recommend.... until they realize just how much of a pain symlinks are on Windows. This is why it hasn't happened before.
In order to create/modify a symlink, you must be running as an admin, and you must get around Windows UAC (that annoying prompt). Luckily, this is a challenge I already solved with some helper scripts in node-windows. As a result, NVM for Windows maintains a single symlink that is put in the system
during installation only. Switching to different versions of node is a matter of switching the symlink target. As a result, this utility does not require you to run
nvm use x.x.x
every time you open a console window. When you do run
nvm use x.x.x
, the active version of node is automatically updated across all open console windows. It also persists between system reboots, so you only need to use nvm when you want to make a change.
NVM for Windows comes with an installer, courtesy of a byproduct of my work on Fenix Web Server.
Overall, this project brings together some ideas, a few battle-hardened pieces of other modules, and support for newer versions of node.
NVM for Windows recognizes the "latest" versions using a list provided by the Node project. Version 1.1.1+ use this list. Before this list existed, I was scraping releases and serving it as a standalone data feed. This list was used in versions 1.1.0 and prior, but is now deprecated.
I needed it, plain and simple. Additionally, it's apparent that support for multiple versions is not coming to node core, or even something they care about. It was also an excuse to play with Go.
I chose Go because it is cross-platform, felt like less overhead than Java, has been around longer than most people think, and I wanted to experiment with it. I've been asked why I didn't write it with Node. Trying to write a tool with the tool you're trying to install doesn't make sense to me. As a result, my project requirements for this were simple... something that's not Node. Node will continue to evolve and change. If you need a reminder of that, io.js. Or consider all the breaking changes between 4.x.x and 6.x.x. These are inevitable in the world of software.
Thanks to everyone who has submitted issues on and off Github, made suggestions, and generally helped make this a better project. Special thanks to