Install Node and NPM using NVM in Mac or Linux (Ubuntu)
1 min readApr 11, 2019
**Pre requisites: In Mac. Make sure you have xcode installed**
curl --version
Install NVM using curl
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.0/install.sh | bash
Either run the command that will pop up, or close and reopen your terminal to start using nvm run
nvm --version
to make sure you got the right version of nvm installed correctly run
nvm install node
Now install node.
//to install the latest version
nvm install node
nvm use node//to install a specific version number
nvm install 8.9 //to install node 8.9
nvm use 8.9//to install the LTS version
nvm install --lts
nvm use --lts
You can install any number of versions of node and switch between versions at any time by running
nvm use desired-version
Now make sure npm was installed by running
npm -v
Your set. Happy Coding!