MCPcopy
hub / github.com/coreybutler/nvm-windows

github.com/coreybutler/nvm-windows @1.2.2 sqlite

repository ↗ · DeepWiki ↗ · release 1.2.2 ↗
155 symbols 404 edges 15 files 38 documented · 25%
README

Notice: We are working full time work on Runtime, the successor to NVM for Windows.

Complete this form to provide your thoughts and sign up for progress updates.

Updates will also be posted on the Author Software LinkedIn Page.

NVM for Windows

The Microsoft/npm/Google recommended Node.js version manager for Windows.

This is not the same thing as nvm! (expand for details)

The original nvm is a completely separate project for Mac/Linux only. This project uses an entirely different philosophy and is not just a clone of nvm. Details are listed in Why another version manager? and what's the big difference?.

Download Now GitHub tag (latest SemVer) GitHub Release Date GitHub all releases Discuss Twitter URL

Sponsors
 
Can't sponsor? Consider nominating @coreybutler for a Github star.

Running into issues? See the common issues wiki.

Seeking Feedback:

We're working on Runtime (rt), the successor to NVM For Windows. Please contribute by taking a minute to complete this form. Thank you!

Overview

Manage multiple installations of node.js on a Windows computer.

tl;dr Similar (not identical) to nvm, but for Windows. Has an installer. Download Now!

This has always been a node version manager, not an io.js manager, so there is no back-support for io.js. Node 4+ is supported. Remember when running nvm install or nvm use, Windows usually requires administrative rights (to create symlinks). To install the latest version of Node.js, run nvm install latest. To install the latest stable version, run nvm install lts.

NVM for Windows

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.

Switch between stable and unstable versions.

Installation & Upgrades

:star: :star: Uninstall any pre-existing Node installations!! :star: :star:

The simplest (recommended) way to get NVM for Windows running properly is to uninstall any prior Node installation before installing NVM for Windows. It avoids all of the pitfalls listed below. However; you may not wish to nuke your Node installation if you've highly customized it. NVM for Windows can assume management of an existing installation, but there are nuances to this (dependent entirely on the permissions of the user running the installation). If you have an administrative account, it's relatively safe to install NVM for Windows before uninstalling the original Node version. If you are working in a closed environment, such as a corporate Active Directory environment where installations/uninstallations are controlled by group policy, you should really consider removing the original version of Node before installing NVM4W.

Permission Problems For security reasons, Windows will not allow an application from one vendor to "uninstall" an application from a different vendor. The official NVM4W installer will attempt assume management of an existing installation of Node., but it cannot actually uninstall the original Node.js version. To work around this, NVM for Windows installer attempts to copy the original Node.js installation files to the NVM root. This includes global npm modules and configurations. Once this process is complete, the original Node.js installation can be uninstalled without losing data.

PATH Installation Problems If you attempt to configure the NVM_SYMLINK to use an existing directory (like C:\Program Files\nodejs), it will fail because a symlink cannot overwrite a physical directory. This is not a problem if you choose a different symlink path (such as C:\nvm\node).

PATH Conflicts If you do not uninstall the original version, running nvm use may appear to do nothing at all. Running node -v will always show the original installation version. This is due to a PATH conflict that presents when the same application is installed multiple times. In NVM4W 1.1.11+, run nvm debug to determine if you have a PATH conflict.

For simpliciy, we recommend uninstalling any existing versions of Node.js before using NVM for Windows. Delete any existing Node.js installation directories (e.g., %ProgramFiles%\nodejs) that might remain. NVM's generated symlink will not overwrite an existing (even empty) installation directory.

:eyes: Backup any global npmrc config :eyes: (e.g. %AppData%\npm\etc\npmrc)

Alternatively, copy the settings to the user config %UserProfile%\.npmrc. Delete the existing npm install location (e.g. %AppData%\npm) to prevent global module conflicts.

Install nvm-windows

Use the latest installer (comes with an uninstaller). Alternatively, follow the manual installation guide.

If NVM4W doesn't appear to work immediately after installation, restart the terminal/powershell (not the whole computer).

NVM for Windows Installer

Reinstall any global utilities

After install, reinstalling global utilities (e.g. yarn) will have to be done for each installed version of node:

nvm use 14.0.0
npm install -g yarn
nvm use 12.0.1
npm install -g yarn

Upgrading nvm-windows

:bulb: As of v1.1.8, there is an upgrade utility that will automate the upgrade process.

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.

Usage

nvm-windows runs in an Admin shell. You'll need to start powershell or Command Prompt as Administrator to use nvm-windows

NVM for Windows is a command line tool. Simply type nvm in the console for help. The basic commands are:

  • 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 debug: Check the NVM4W process for known problems.
  • nvm current: Display active version.
  • nvm install <version> [arch]: The version can be a specific version, "latest" for the latest current version, or "lts" for the most recent LTS 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. Add --insecure to the end of this command to bypass SSL validation of the remote download server.
  • 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 use latest, lts, or newest. newest is the latest installed version. Optionally specify 32/64bit architecture. nvm use <arch> will continue using the selected version, but switch to 32/64 bit mode. 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://npmmirror.com/mirrors/node/
  • nvm npm_mirror <npm_mirror_url>: Set the npm mirror.People in China can use https://npmmirror.com/mirrors/npm/

:warning: Gotcha!

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.

:name_badge: Antivirus

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.

v1.1.8 is not code signed, but all other versions are signed by Ecor Ventures LLC/Author.io. This should help prevent false positives with most antivirus software.

v1.1.8+ was not code signed due to an expired certificate (see the release notes for reasons). v1.1.9 is code signed thanks to ajyong, who sponsored the new certificate.

Using Yarn

tldr; npm i -g yarn

See the wiki for details.

Build from source

  • Install go from http://golang.org
  • Download source / Git Clone the repo
  • Change GOARCH to amd64 in build.bat if you feel like building a 64-bit executable
  • Fire up a Windows command prompt and change directory to project dir
  • Execute go get github.com/blang/semver
  • Execute go get github.com/olekukonko/tablewriter
  • Execute build.bat
  • Check the distdirectory for generated setup program.

:bulb: Why another version manager?

There are several version managers for node.js. Tools like nvm and n only run on Ma

Core symbols most depended-on inside this repo

abortOnError
called by 24
src/upgrade/register.go
String
called by 11
src/semver/semver.go
notify
called by 9
src/nvm.go
Validate
called by 9
src/semver/semver.go
containsOnly
called by 9
src/semver/semver.go
encode
called by 8
src/nvm.go
help
called by 7
src/nvm.go
elevatedRun
called by 7
src/nvm.go

Shape

Function 121
Method 19
Struct 14
TypeAlias 1

Languages

Go100%

Modules by API surface

src/nvm.go43 symbols
src/upgrade/upgrade.go25 symbols
src/semver/semver.go18 symbols
src/web/web.go14 symbols
src/node/node.go14 symbols
src/upgrade/register.go8 symbols
src/utility/logging.go7 symbols
src/upgrade/notification.go7 symbols
src/upgrade/check.go6 symbols
src/utility/rename.go3 symbols
src/file/file.go3 symbols
src/arch/arch.go3 symbols

Dependencies from manifests, versioned

github.com/akavel/rsrcv0.10.2 · 1×
github.com/blang/semverv3.5.1+incompatible · 1×
github.com/coreybutler/go-fsutilv1.2.0 · 1×
github.com/coreybutler/go-wherev1.0.2 · 1×
github.com/dchest/jsminv0.0.0-2022021816574 · 1×
github.com/dustin/go-humanizev1.0.1 · 1×
github.com/go-toast/toastv0.0.0-2019021103040 · 1×
github.com/josephspurrier/goversioninfov1.4.1 · 1×
github.com/mattn/go-runewidthv0.0.9 · 1×
github.com/ncruces/zenityv0.10.14 · 1×
github.com/nu7hatch/gouuidv0.0.0-2013122120053 · 1×
github.com/olekukonko/tablewriterv0.0.5 · 1×

For agents

$ claude mcp add nvm-windows \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact