{"record":{"id":"0baa881dbabf49b7","repo":"coreybutler/nvm-windows","slug":"node-v-s-v-bit-is-not-installed","errorCode":null,"errorMessage":"node v%s (%v-bit) is not installed.","messagePattern":"node v(.+?) \\((.+?)-bit\\) is not installed\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/nvm.go","lineNumber":1167,"sourceCode":"\n\tgo func() {\n\t\tif err != nil {\n\t\t\tif !strings.Contains(err.Error(), \"No Major.Minor.Patch\") {\n\t\t\t\tstatus <- Status{Err: err, Done: true}\n\t\t\t}\n\t\t}\n\n\t\t// Check if a change is needed\n\t\tcurVersion, curCpuarch := node.GetCurrentVersion()\n\t\tif version == curVersion && cpuarch == curCpuarch {\n\t\t\tfmt.Println(\"node v\" + version + \" (\" + cpuarch + \"-bit) is already in use.\")\n\t\t\tstatus <- Status{Done: true}\n\t\t\treturn\n\t\t}\n\n\t\t// Make sure the version is installed. If not, warn.\n\t\tif !node.IsVersionInstalled(env.root, version, cpuarch) {\n\t\t\terr = fmt.Errorf(\"node v%s (%v-bit) is not installed.\", version, cpuarch)\n\t\t\tif notifications {\n\t\t\t\tstatus <- Status{Err: err, Done: true}\n\t\t\t}\n\t\t\tif (cpuarch == \"32\" && node.IsVersionInstalled(env.root, version, \"64\")) || (cpuarch == \"64\" && node.IsVersionInstalled(env.root, version, \"32\")) {\n\t\t\t\tstatus <- 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}\n\t\t\t}\n\t\t\tstatus <- Status{Err: fmt.Errorf(\"Version not installed. Run \\\"nvm ls\\\" to see available versions.\"), Done: true}\n\t\t}\n\n\t\t// Remove symlink if it already exists\n\t\tsym, _ := os.Lstat(env.symlink)\n\t\tif sym != nil {\n\t\t\terr = validSymlink(env.symlink)\n\t\t\tif err != nil {\n\t\t\t\tstatus <- Status{Err: err, Done: true}\n\t\t\t}\n\n\t\t\t// _, err := runElevated(fmt.Sprintf(`\"%s\" cmd /C rmdir \"%s\"`, filepath.Join(env.root, \"elevate.cmd\"), filepath.Clean(env.symlink)))","sourceCodeStart":1149,"sourceCodeEnd":1185,"githubUrl":"https://github.com/coreybutler/nvm-windows/blob/5b18223ca19ff50d707f35410dbc6bd440a9f74d/src/nvm.go#L1149-L1185","documentation":"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.","triggerScenarios":"`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.","commonSituations":"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.","solutions":["Install the exact combination first: `nvm install <version> <arch>`, then `nvm use <version> <arch>`.","If the 'Did you mean' hint appeared, switch to the installed bitness: `nvm use 20.11.0 32`.","Run `nvm ls` to see which version+arch directories actually exist, and align `nvm arch` with what you install."],"exampleFix":"# before\nnvm use 20.11.0 64   # only 32-bit installed\n# after\nnvm install 20.11.0 64\nnvm use 20.11.0 64","handlingStrategy":"validation","validationCode":"# bash: confirm the exact version+arch dir exists before switching\nif [ ! -d \"$NVM_HOME/v$V\" ]; then nvm install \"$V\" \"${ARCH:-}\"; fi\nnvm use \"$V\" \"${ARCH:-}\"","typeGuard":null,"tryCatchPattern":"nvm use \"$V\" \"$ARCH\" || nvm install \"$V\" \"$ARCH\" && nvm use \"$V\" \"$ARCH\"","preventionTips":["Always `nvm install` before `nvm use` for a given version+arch pair.","Keep `nvm arch` consistent between install and use commands.","Check `nvm ls` (it shows per-arch entries) before scripting a use."],"tags":["nvm-windows","use","not-installed","cpu-architecture"],"backgroundTag":null,"analyzedSha":"5b18223ca19ff50d707f35410dbc6bd440a9f74d","analyzedAt":"2026-08-15T10:06:51.428Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}