使用Node Version Manager时,我可以使用nvm use node
将当前目录中的节点版本设置为最新版本。如何指定使用哪个版本?
答案 0 :(得分:5)
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).