nvm

nvm use does not switch node versions


on a Windows 10 machine and using nvm4w I tried:

from the above image:

what am I doing wrong?


Solution

  • I had to delete the folder located at C:\Program Files\nodejs:

    enter image description here

    And then run nvm use {version} again to repopulate this folder with the correct node version.

    I suspect that nvm is having trouble deleting this folder due to permission issues.

    I have also experienced an issue where nvm seems to mix up the saved versions of node. For example it will save v14 in place of v16. In this case uninstall the version you wish to use using nvm uninstall {version} and then install it again using nvm install {version}.