nvm-windows: `nvm use` reports that the version was not installed or could not be found

Issue:

How To Reproduce:

nvm install 16 Downloading node.js version 16.13.1 (64-bit)… Extracting… Complete

Installation complete. If you want to use this version, type

nvm use 16.13.1

nvm use 16 node vv16.13.1 (64-bit) is not installed or cannot be found. Please notice the double v in front of the version.

nvm use 16.13.1 Now using node v16.13.1 (64-bit)

Expected Behavior: nvm use resolves the version properly

Desktop:

  • OS: Windows

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 40
  • Comments: 46 (9 by maintainers)

Commits related to this issue

Most upvoted comments

Nope, typing the full version doesn’t work either.

I have the same issue, I think it does works when you add the letter v before the version works, but you have to be an Administrator (elevated privileges): image

nvm version 1.1.9

Now as a user: image

  • “Acceso denegado” = “Access denied”
  • “No se puede crear un archivo que ya existe” = “Is not possible to create a file that already exists”

@Rusinas the only workaround is to type the full version 😉 so do nvm list first and then type the full version, like nvm use 12.22.8. Or take my branch, build and deploy the exe to your machine 😉

@Rusinas the only workaround is to type the full version 😉 so do nvm list first and then type the full version, like nvm use 12.22.8. Or take my branch, build and deploy the exe to your machine 😉

Nope, typing the full version doesn’t work either.

image

I think I’m okay with 16 for now, but any chance your branch will be merged soon?

I had the same issue, I resolve it by

  • running my cmd as admin
  • installing the node version I want
  • lastly typing nvm use 16.14.2 instead of nvm use 16 Note: 16.14.2 is the current version on my pc. to check yours use nvm list

Hope this solves your issue

run as admin on cmd. now i can use it image

same issue is happening for me. any idea when it will be fixed?

It looks like your prior installations weren’t unpacked. I’m not sure how that happened because NVM4W unpacks the contents in a temp directory when it writes to the final location. It expects a file structure like this:

image

I’m not sure why this occurred. If you have a mirror setup, it’s possible the installers are in a different format. There are other users who have experienced similar symptoms, but it’s not common and there is no clear reason why it’s happening to some people and not others.

If anyone else runs into this, please open a new issue.

Hello guys, I build a binary output based on e050a107363af310edace07ba76d0bd863f42b00 , which nvm use xx works. The only thing I changed is updated the NvmVersion from 1.1.9 to 1.1.10 (Unofficial release build by DevDengChao on 050a107)

Try the installer or just replace the nvm.exe under C:\Users\${USER}\AppData\Roaming\nvm 🎉 nvm-noinstall.zip nvm-noinstall.zip.checksum.txt nvm-setup.zip nvm-setup.zip.checksum.txt nvm-update.zip nvm-update.zip.checksum.txt

This is addressed in PR #709, which will be merged in an upcoming release.

2022-11-08 step 1 - Open Git Bash as an Administrator. step 2 - Type “node --version” enter. step 3 - Type “nvm --help” enter to check whether you have install it correctly or not. step 4 - Type “nvm list available” then hit the enter button. step 5 - Type “nvm use 18.12.1” (use your version accordingly by seeing the list) and enter. step 6 - If it shows “node v18.12.1 (64-bit) is not installed.”. Type “nvm install 18.12.1”(use your version accordingly) step 7 - Now type “nvm use 18.12.1” and hit the enter button. step 8 - Type “nvm current” to recheck whether nvm is using v18.12.1 or not.

This is how I figure it out. Thank You

This is now available in v1.1.10.

I met this issue when I installed 16.4.2 and tried to use it. The previous version was 10.18.1. I tried most of the solutions above but didn’t get it solved. Then I #1 run nvm on. The version being used was automatically updated to the latest version I installed (17.8.0), although I didn’t run “nvm use xx.xx.xx”. After this, I tried to use 16.4.2 but the version was not found as usual. So I #2 run “nvm node_mirror” and “nvm npm_mirror” to set them to the default ones. And I reinstalled 16.4.2. After this, nvm use 16.4.2 took effect. I am not sure which step is really affecting. Hope the experience can help. #1 nvm on #2 set to default mirror, reinstall the version and use it.

Yeah I just try nvm on in administrator mode then it works. Amazing.

For those reaching this page via Google, upgrade to at least v1.1.11 and run nvm debug. It will catch many configuration problems.

There is one known issue it will not catch yet (in v1.1.11). If you have an invalid Node installation, such as one that didn’t failed to extract the files or has no node.exe, then you’ll need to reinstall that particular version.

A proper installation should look similar to this:

C:\Users\corey\AppData\Roaming\nvm\v19.6.0 image

An example of an invalid installation:

C:\Users\corey\AppData\Roaming\nvm\v19.2.0 image

A check for this has already been added to the master branch. It will be a part of v1.1.12 when it is released.

The issue is closed because the PR was merged. However; merging the PR is not the same as releasing the software. This is scheduled to be a part of v1.1.10 (release TBD, after other PRs have been reviewed/merged).

@coreybutler It’s been long time we suffer from this, can we just have a v1.1.9-patch-1 first ?

I manually deleted all of the node version folders and I was now able to install and use node 16.20.0. This is very strange but I guess it’s ok now.

I solved this problem by typing the full version. Example: nvm use 14.0.0. It works all fine now.

I had the same problem and resolved it by running Git Bash as admin then using the nvm use command with the full version (14.20.0 for me).

The issue is closed because the PR was merged. However; merging the PR is not the same as releasing the software. This is scheduled to be a part of v1.1.10 (release TBD, after other PRs have been reviewed/merged).

在 cmd 上以管理员身份运行。现在我可以使用它 图像

I’ve tried. I can’t use it a