Reputation: 175
I can't set the default version in NVM. I always get this warning: Version xx.xx.x does not exist. no matter what I type. I am on Ubuntu 18.04 and have ZSH installed with the script. This is what I get when I do nvm list :
-> system
default -> 10.15.3 (-> N/A)
iojs -> N/A (default)
node -> stable (-> N/A) (default)
unstable -> N/A (default)
lts/ -> lts/dubnium (-> N/A)
lts/argon -> v4.9.1 (-> N/A)
lts/boron -> v6.17.1 (-> N/A)
lts/carbon -> v8.16.0 (-> N/A)
lts/dubnium -> v10.15.3 (-> N/A)
Upvotes: 2
Views: 4894
Reputation: 637
You should first install your node version.
Supposing it's the latest stable version (in March 2022 is 16.14.0) you should do
nvm install 16.14.0
Then, check if version was successfully installed with
nvm list
And finally, set the default version with
nvm alias default 16.14.0
Now you are ready to go
Upvotes: 5
Reputation: 175
You first need to install a node version that will be set as your default version. Use nvm list
to get the full list of available versions and use nvm install
to install it. Use nvm install node
for the latest version.
Upvotes: 0