Install NodeJS and NPM (Mac and Windows)

Share this post

Node.js is a JavaScript-based environment that can be used to create servers applications.

NPM is the package manager that can be used to install Node packages.

NPM is installed by default when you install Node.

Install Node on Windows

Download the Installer

Download the installer on nodejs.org.

Execute the MSI Installation Wizard

Click on the .msi file and follow the installation wizard instructions.

After everything is installed you can check if Node was properly installed using the node -v command in command-line.

Install Node on Mac (with Homebrew)

To install Node on MAC using Homebrew, you need to install Homebrew first.

Go to the Terminal and type:

$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Type which brew to find if it is properly installed.

$ which brew

If it returns something like that:

/usr/local/bin/brew

Then you are ready to install node using brew install.

$ brew install node

Check if Node and NPM are properly installed

Go to Terminal (on Mac) or Command-Line (on Windows) and type:

$ node -v
$ npm -v

Should return the versions that you installed.

v14.4.0
6.14.4

This is it. Node is installed and ready to use on Mac and on Windows.