What does "nvm use" command do in Windows?

Viewed 6361

Does it edit windows registries? Adds something to PATH? Adds environment variables to user profile? Stores something to APP_DATA directory?

What exactly is the outcome of "nvm use" command? And how given setting is persisted into the system?

1 Answers

NVM for Windows maintains a single symlink that is put in the system PATH during installation only. Switching to different versions of node is a matter of switching the symlink target. As a result, this utility does not require you to run nvm use x.x.x every time you open a console window. When you do run nvm use x.x.x, the active version of node is automatically updated across all open console windows. It also persists between system reboots, so you only need to use nvm when you want to make a change.

source

Symlink is located under %NVM_SYMLINK% wich defaults to C:\Program Files\nodejs and versions are downloaded under %NVM_HOME% which defaults to C:\Users\<user>\AppData\Roaming\nvm

Related