Quick tip of the day. How to install nvm (Node Version Manager) & Node?
I am going to use Homebrew to install NVM on Mac, follow the steps given below.
brew install nvm
Once you have run above commands successfully, next you need to modify your .bash_profile or .zshrc (robbyrussell/oh-my-zsh) depends what you are using. Add following two lines at the end the .bash_profile file.
source $(brew --prefix nvm)/nvm.sh
Save and exit the file to check if nvm is installed and configured correctly.
echo $NVM_DIR, if you see the correct nvm path, then all set.
Let’s install node, but before you install node take a look at available node versions in order to get idea how they are named.
nvm ls-remote, go for your desire version or you can alway look for “(Latest LTS: Dubnium)”
nvm install v10.13.0
After this you have successfully install nvm, node & npm, run following commands to verify installed versions.
That’s it, see you in next quick tip.