coreybutler/nvm-windows · error

node v%s (%v-bit) is not installed.

Error message

node v%s (%v-bit) is not installed.

What it means

Sent during `nvm use <version> <arch>` when node.IsVersionInstalled(env.root, version, cpuarch) is false — the exact version+arch combination has no directory under the nvm root. It is a pre-switch guard: the current version/arch pair differs (or the early 'already in use' return did not hit) and the target simply is not installed.

Source

Thrown at src/nvm.go:1167

	go func() {
		if err != nil {
			if !strings.Contains(err.Error(), "No Major.Minor.Patch") {
				status <- Status{Err: err, Done: true}
			}
		}

		// Check if a change is needed
		curVersion, curCpuarch := node.GetCurrentVersion()
		if version == curVersion && cpuarch == curCpuarch {
			fmt.Println("node v" + version + " (" + cpuarch + "-bit) is already in use.")
			status <- Status{Done: true}
			return
		}

		// Make sure the version is installed. If not, warn.
		if !node.IsVersionInstalled(env.root, version, cpuarch) {
			err = fmt.Errorf("node v%s (%v-bit) is not installed.", version, cpuarch)
			if notifications {
				status <- Status{Err: err, Done: true}
			}
			if (cpuarch == "32" && node.IsVersionInstalled(env.root, version, "64")) || (cpuarch == "64" && node.IsVersionInstalled(env.root, version, "32")) {
				status <- Status{Err: fmt.Errorf("Did you mean node v%s (%v-bit)?\nIf so, type \"nvm use %s %v\" to use it.", version, cpuarch, version, cpuarch), Done: true}
			}
			status <- Status{Err: fmt.Errorf("Version not installed. Run \"nvm ls\" to see available versions."), Done: true}
		}

		// Remove symlink if it already exists
		sym, _ := os.Lstat(env.symlink)
		if sym != nil {
			err = validSymlink(env.symlink)
			if err != nil {
				status <- Status{Err: err, Done: true}
			}

			// _, err := runElevated(fmt.Sprintf(`"%s" cmd /C rmdir "%s"`, filepath.Join(env.root, "elevate.cmd"), filepath.Clean(env.symlink)))

View on GitHub (pinned to 5b18223ca1)

Solutions

  1. Install the exact combination first: `nvm install <version> <arch>`, then `nvm use <version> <arch>`.
  2. If the 'Did you mean' hint appeared, switch to the installed bitness: `nvm use 20.11.0 32`.
  3. Run `nvm ls` to see which version+arch directories actually exist, and align `nvm arch` with what you install.

Example fix

# before
nvm use 20.11.0 64   # only 32-bit installed
# after
nvm install 20.11.0 64
nvm use 20.11.0 64
Defensive patterns

Strategy: validation

Validate before calling

# bash: confirm the exact version+arch dir exists before switching
if [ ! -d "$NVM_HOME/v$V" ]; then nvm install "$V" "${ARCH:-}"; fi
nvm use "$V" "${ARCH:-}"

Try / catch

nvm use "$V" "$ARCH" || nvm install "$V" "$ARCH" && nvm use "$V" "$ARCH"

Prevention

When it happens

Trigger: `nvm use 20.11.0 64` when only 20.11.0 32 is installed (this also triggers the 'Did you mean' follow-up), or `nvm use 18.19.1` with nothing installed. Note the code sends the not-installed error first when notifications are on, then possibly the 'Did you mean' hint, then a generic 'Version not installed' status — multiple Status messages for one miss.

Common situations: Defaulting to 64-bit via `nvm arch` then using a version installed only as 32-bit (common after migrating settings); using a version uninstalled by another tool; arch default changed between install and use.

Related errors


AI-assisted analysis of coreybutler/nvm-windows@5b18223ca1 (2026-08-15). Data as JSON: /api/errors/0baa881dbabf49b7. Report an issue: GitHub.