{"record":{"id":"953e23ac92eef6b1","repo":"coreybutler/nvm-windows","slug":"did-you-mean-node-v-s-v-bit-if-so-type-nvm-u","errorCode":null,"errorMessage":"Did you mean node v%s (%v-bit)?\nIf so, type \"nvm use %s %v\" to use it.","messagePattern":"Did you mean node v(.+?) \\((.+?)-bit\\)\\?\nIf so, type \"nvm use (.+?) (.+?)\" to use it\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/nvm.go","lineNumber":1172,"sourceCode":"\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)))\n\t\t\t_, err := elevatedRun(\"rmdir\", filepath.Clean(env.symlink))\n\t\t\tif err != nil {\n\t\t\t\tif accessDenied(err) {\n\t\t\t\t\tstatus <- Status{Err: err, Done: true}\n\t\t\t\t}","sourceCodeStart":1154,"sourceCodeEnd":1190,"githubUrl":"https://github.com/coreybutler/nvm-windows/blob/5b18223ca19ff50d707f35410dbc6bd440a9f74d/src/nvm.go#L1154-L1190","documentation":"Thrown by nvm-windows during `nvm use <version> <arch>` when the requested Node version is not installed for the requested CPU architecture, but IS installed for the opposite architecture. It is a hint error suggesting the correct `nvm use` invocation. Note the message prints the requested (wrong) arch in the suggestion rather than the installed one, which is a known cosmetic quirk of this source region.","triggerScenarios":"Running `nvm use 20.11.0 32` when only v20.11.0 64-bit is installed (node.IsVersionInstalled(root, \"20.11.0\", \"32\") is false but ...\"64\" is true), or the inverse with 64 requested and only 32 installed.","commonSituations":"User installs Node with `nvm install 20.11.0` (defaults to machine arch, e.g. 64) then runs `nvm use 20.11.0 32`; or a 32-bit override in NVM_ARCH/setting persists after switching machines; or a version was installed on another machine layout and copied over.","solutions":["Run the suggested command for the architecture actually installed, e.g. `nvm use 20.11.0 64`","Run `nvm ls` to confirm which arch of the version exists locally","Install the desired arch explicitly: `nvm install 20.11.0 32` then `nvm use 20.11.0 32`","Unset any stale NVM_ARCH environment variable that forces the wrong architecture"],"exampleFix":"# before\nnvm use 20.11.0 32   # only 64-bit build installed\n\n# after\nnvm use 20.11.0 64\n# or, if 32-bit is genuinely required:\nnvm install 20.11.0 32 && nvm use 20.11.0 32","handlingStrategy":"validation","validationCode":"// Before `nvm use`, check what is actually installed\nout, _ := exec.Command(\"nvm\", \"ls\").Output()\ninstalled := string(out)\nwant := \"20.11.0\"\nif !strings.Contains(installed, want) {\n    log.Fatalf(\"version %s not installed; run: nvm install %s\", want, want)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always pair nvm install <version> <arch> and nvm use <version> <arch> with matching arch arguments","Run `nvm ls` before `nvm use` to confirm the version and bitness exist locally","Clear stale NVM_ARCH overrides in the environment or settings.txt"],"tags":["nvm-windows","node","architecture","cli","version-management"],"backgroundTag":null,"analyzedSha":"5b18223ca19ff50d707f35410dbc6bd440a9f74d","analyzedAt":"2026-08-15T10:06:51.428Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}