Difference between NPM and NVM

JohnTheBeloved picture JohnTheBeloved · Sep 18, 2015 · Viewed 62.2k times · Source

I know npm is the package manager and nvm is the node version manager. I am currently trying to auto-install my development and production environment using Bash and forgot how I started out and in what order. After installing npm, I found our nvm was not installed.

Do I still need to install nvm? If so, what is the benefit?

Answer

ThomasReggi picture ThomasReggi · Sep 18, 2015

nvm (Node Version Manager) is a tool that allows you to download and install Node.js. Check if you have it installed via nvm --version.

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.26.1/install.sh | bash

npm (Node Package Manager) is a tool that allows you to install javascript packages. Check if you have it installed via npm --version.

npm comes with Node.js so if you have node installed (node --version) you most likely have npm installed as well.

You don't need nvm unless you you want to keep multiple versions of Node.js installed on your system or if you'd like to upgrade your current version.