NVM: How do you set the node version globally?

Viewed 11256

When using Node Version Manager, I can set the version of node to the latest version in the current directory with nvm use node. How do you specify which version to use?

2 Answers

nvm use VERSION

if VERSION is 12.22.6, the command to use this version is

nvm use 12.22.6

You must install a version before using it. To install a version, the command is:

nvm install VERSION

If you wish to alias your versions, then you would use the command:

nvm alias mynodeversion 12.22.6
nvm use mynodeversion
Related