on a Windows 10 machine and using nvm4w I tried:
from the above image:
node --version
to check the current versionnvm list
to list installed versionsnvm use 8.8.1
so we switch from 6 to 8nvm on
to enable itnode --version
to re-check the node versionwhat am I doing wrong?
Switching among Node. 7; we can simply run either nvm use 12.22. 7 or nvm use 16.13. 0 to easily switch into either version we need. Note that since we only have one version that begins with 12, 14, or 16, we can switch versions with a simple nvm use 16 , nvm use 14 , or nvm use 12 command.
Switching Between Versions So if you install the latest Node. js version, and run node -v right after, you'll see the latest version output. To switch through installed versions, nvm provides the nvm use command. This works similarly to the install command.
You can install two versions of Node. js using nvm, and install different version of npm on each Node. js environment. For example, nvm install 14.18.
To change Node. JS versions, we have to first download the version we want. Make sure you have nvm installed first. If you don't know the version you want to install, type nvm ls-remote to get a full list of all installable Node.
I had to delete the folder located at C:\Program Files\nodejs
:
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.
So I found a workaround.
I renamed C:\Program Files\nodejs
to C:\Program Files\nodejsx
and then running nvm use versionNumber
works fine.
Seems like nvm cannot change it to a symlink and fails silently.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With