> nodist 0.10 0.10.26 > node -v v0.10.26 > nodist 0.10.24 0.10.25 > 0.10.26 (global) 0.11.11 0.11.12
You might also be interested in iodist, a version manager for io.js.
Nodist was designed to replace any existing node.js installation, so if node is already installed on your machine, uninstall it first.
git clone git://github.com/marcelklehr/nodist.git(or grab the zip)
(Note that certain paths, e.g.
Program Files, require admin rights!)
setx /M PATH "path\to\nodist\bin;%PATH%"(setx not available?)
setx /M NODIST_PREFIX "path\to\nodist"
setx /M NODE_PATH "path\to\nodist\bin\node_modules;%NODE_PATH%"if you want your globally-installed modules to be visible in
nodist selfupdate(updates the dependencies and sets npm's global prefix)
npm config set prefix %NODIST_PREFIX%\bin
Fancy installation (beta; discouraged)
Install chocolatey: http://chocolatey.org/
cinst nodist -Pre
Note: Our chocolatey package has a limitation such that a reboot is required aftewards for nodist to be accessible. We'll try to fix this soon.
Migrating from <=0.4 to 0.5
Instead of copying around the executables, there's now a binary shim (written in go). Prior to 0.4 the global executable was switched everytime you changed the version,
now nodist uses a binary shim that makes sure every call to node gets the correct versoin, so when migrating to 0.5, please make sure that
/nodist/bin/node.exe is that shim.
You can build the shim yourself from source (
nodist/build.bat, but it should come ready with the zip and git packages.
<..path..>\nodist\binfrom your path. (how?).
Delete the nodist directory
Nodist understands version patterns, like
~0.8 as well as
As an added bonus, you may also use
Btw, nodist also works in your PowerShell, but you might first need to 'Unblock' the file
All commands implicitly install the specified version before using it, if it's not installed already.
> nodist # Lists installed versions highlighting the active one.
> nodist 0.8.1 # Sets the global node version.
> nodist local 0.8.1 # Sets the node version per directory (including subdirectories).
> nodist env v0.7.12 # Sets the node version per terminal.
call nodist env 0.7.12 # In a batch script use `call`.
> nodist dist # Lists all available node versions.
> nodist r v0.8.1 -- foo.js -s # Runs a specific version without modifying any state.
> nodist + v0.8.1 # Just checks, if the version is installed and downloads it if not. > nodist + all # will install *everything*.
> nodist - 0.5.10 # Removes a version.
> nodist --help # Displays a complete list of commands with examples.
> set HTTP_PROXY=http://myproxy.com:8213 # Set a proxy to use for fetching the executables # (you may also use `HTTP_PROXY`/`http_proxy`/`HTTPS_PROXY`/`https_proxy`).
> set NODIST_X64=0 # Override x64 auto-detection. # (Set to `1` to enforce 64bit, `0` to enforce 32bit.)
Node executables are stored in
node.exe is a shim and chooses the right node version to run based on the various version settings:
- global --
NODIST_PREFIX\.node-versioncontains the global node version
- local --
./.node-versionin the current working directory contains the local node verison
- env --
NODIST_VERSIONcontainst the environmental node version
The latest npm version is available out of the box.
As the global node version will be subject to change,
nodist comes with its own dedicated node binary.
Got ideas? Doesn't work for you? Want to give feedback?
File an issue and tell me what you'd change or add or what doesn't work for you. Every issue is welcome!
Copyright (c) 2012-2014 by Marcel Klehr
- Fix nodist version
- Fix npm prefix in
- Use a binary shim
- Support for localized version switching
- Check in dependencies to avoid relying on npm on install
- Update bundled npm to v1.4.6 and check-in all files
- Update pre-packaged npm to v1.4.3
nodist -vin powershell (thanks to @devert for reporting)
- Fix GOTO in batch file (thanks to @BergWerkGIS)
- Fix a type coercion catch in x64 detection (NODIST_X64=0 had the same effect as NODIST_X64=1; thanks to @springmeyer for reporting)
- Use the right URI for fetching the x64 executables
- x64 auto-detection
- Refactor 64bit support (All commands now work with x64 versions)
- Make npm use the user-chosen node version (thanks to @k-j-kleist for reporting)
- Fix some minor bugs in error handling
- Don't try installing 'vUpdate' after running nodist update
- Install latest stable version after running nodist update
- Fix 'use' command in powershell (thanks to @paulbatum for reporting)
- Fix 'use' by fixing 'path' and 'bin' commands
- Fix renaming mistake (thanks to @paulbatum for reporting)
- Add support for x64 versions (thanks to @CycoPH)
- Improve performance by caching version lists
- Allow people to use an http proxy (thanks to @gratex)
- Fix install script. How did that go astray?
- Fix error message if n.checkout fails
- Fix installer (thanks to @Ciantic for reporting)
- Fix a bug introduced by npm update
- Update npm on install/update
nodist + all
- Use a clean npm
- Don't bundle dependencies, anymore --
nodist updatemust be run at install
optimist(caused more problems than it solved)
node-semver, now, for better usability... (fixes #10)
- Allow use of version patterns for every command (fixes #9)
- Fix issue #8: Version patterns should require internet access
- Fix use command
- Deploy by copying node.exe, again, this should allow people to use nodist together with nodemon
- Fix a bug, that used to break everything on Win7 x64
- Updated npm to v1.1.48
nodist updatecommand to work from all drives
- Add basic support for MinGW shell (thanks to jdiamond) (update and use commands are still missing)
- Fix tests
- Allow npm updates with
npm u npm -g
- updated npm
- Install latest stable as default version
- Add update command
- Updated npm