nvm use does not switch node versions

nvm
balexandre picture balexandre · Oct 30, 2017 · Viewed 13.5k times · Source

on a Windows 10 machine and using nvm4w I tried:

from the above image:

  • node --version to check the current version
  • nvm list to list installed versions
  • nvm use 8.8.1 so we switch from 6 to 8
  • nvm on to enable it
  • node --version to re-check the node version

what am I doing wrong?

Answer

Dustin Spengler picture Dustin Spengler · Mar 12, 2019

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 in some cases nvm is having trouble deleting this folder for some reason.