Reputation: 5610
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?
Upvotes: 6
Views: 29517
Reputation: 385
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
Upvotes: 0
Reputation: 3627
Let's say you have versions v8.2.0
and v8.3.0
installed.
To make version v8.2.0
the currently used one, you can call nvm use 8.2.0
.
nvm use
also accepts aliases, so you could create one like this:
nvm alias mysuperversion 8.2.0
and then make it the current one by calling nvm use mysuperversion
.
To make a specific version of Node a global one, you should create a default
alias (or modify it if it already exists, the same way you create a new one).
Upvotes: 21