SWITCH TO A NEW VERSION (TEMPORARY)
If you want to switch to a new version of node temporarily, use the command
nvm use [version]
where version
is the version number. For example, to switch to node 18.20.0, your command will be
nvm use 18.20.0
This will switch the node version until you close your IDE, and then it will restore the default version.
SWITCH TO A NEW VERSION (CHANGE DEFAULT)
If you'd like to change the default node version you're using so that you don't have to continue to change versions every time you re-open your IDE, use the keywords alias default
with nvm
like this:
nvm alias default [version]
where version
is the version number. For example, to switch to node 18.20.0, your command will be
nvm alias default 18.20.0
Top comments (2)
how to install new version with nvm ?
dev.to/shaundai/how-to-install-a-n...