jorgebucaran / nvm.fish

The Node.js version manager you'll adore, crafted just for Fish
https://git.io/nvm.fish
MIT License
2.13k stars 71 forks source link

nvm is not setting the default node version at shell startup #143

Closed paulo-santana closed 3 years ago

paulo-santana commented 3 years ago

Hi, I'm having this issue with nvm where it doesn't bother getting the value at $nvm_default_version, and I have to set it up manually if I wish to work on a nodejs project.

I already tried to update it, uninstall and reinstall it, and the problem continues.

nvm_000

jorgebucaran commented 3 years ago

The nvm install command activates the specified Node version only in the current environment. To set the default version for new shells you need to set $nvm_default_version.

set --universal nvm_default_version v14.16.0

Now open a new shell. Your Node version should be 14.6. Can you confirm that?

paulo-santana commented 3 years ago

Just to answer your question, I did have set the variable up. On the screenshot I sent, I echoed it and we can see the value is there.

But I'll close the issue now because, after a reboot, everything seems to be working fine. I truly don't know what might have gone wrong... Thank you anyway for your help!

jorgebucaran commented 3 years ago

For the record, just setting the variable doesn't install Node, it just tells nvm to use that version in new shells.

Also, you don't seem to have a system Node installed, which is why the first time you entered node there was an error.