Install Node and NPM using NVM in Mac or Linux (Ubuntu)

Image for post
Image for post

**Pre requisites: In Mac. Make sure you have xcode installed**

curl --version

Install NVM using curl

curl -o- | 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

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!

Written by

Entrepreneur, MBA, Innovation and Tech Enthusiast, Co Founder at Torus Digital, Learning to Code #nature #outdoors #surf #fishing #coffee #rum #mycology

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store