An out-of-the-box Node.js version manager for Windows, aimed at using different versions of Node.js in different terminals at the same time.
There are still some key features missing from this tool, and I will eventually complete them. If you want to participate, please feel free to create a PR.
- Download and manage multiple Node.js versions (and architectures)
- Switch the version used by the current shell via environment variables
- Switch the global(or default) version via command
- No version conflicts: terminals using different versions do not interfere with each other
Nuke | nvm-windows | fnm | nodist | |
---|---|---|---|---|
Language | Rust | Go | Rust | Node.js |
Zero configuration | โ | โ | ||
Use multiple version at same time | โ | โ | โ | |
No post-script required | โ | โ | โ | |
No elevated privileges required | โ | โ | ||
Install different Node.js architectures | โ | โ | โ |
My investigation may not have gone far enough, please feel free to correct any inaccurate information.
- Download nuke from GitHub Releases.
- Double click to start
nuke.exe
- Press
Y
to allow nuke to install on your computer. - Open a command prompt (e.g. cmd, powershell) and use the
nuke
command.
Nuke provides the install
command for installing Node.js.
nuke install <Node.js Version> [--arch <Arch>]
For example, if you want to install the latest version of Node.js with major version 18
, you can use the following command๏ผ
nuke install 18
When you have multiple versions of Node.js installed, you can switch versions in two ways.
The nuke default
command allows you to switch the version of Node.js used globally.
nuke default 18
By setting the NUKE_NODE_VERSION
and NUKE_NODE_ARCH
environment variables, you can specify the version of Node.js used by the current shell session, which does not effect the other environments.
$env:NUKE_NODE_VERSION=18
$env:NUKE_NODE_ARCH=x86
npm install
nuke -h
I often need to use both 64-bit and 32-bit Node.js for some build tasks on a single windows continuous integration machine. At the same time there are other guys using Node.js on this server to do other things. But nvm-windows doesn't allow us to use different versions of Node.js at the same time. When I switched to other alternative tools, the complex configuration gave me a huge headache. So I simply wrote my own tool to solve this problem.
Once Nuke is installed, it creates several executables in the bin
folder named node.exe
, npm.exe
and npx.exe
, which are actually Nuke Launcher. The bin
folder is added to the operating system's PATH environment variable when Nuke is installed. Before you need to use Node.js, you can set an environment variable that lets Nuke Launcher know what version of Node.js you want to use, so that when you start Nuke Launcher with the node
command, it knows what version of Node.js to launch and starts it as a child process with all parameters passed through.