The Best Way to Install Node.js, npm and yarn on Mac OSX

Node, npm and yarn

The best way to install Node.js on Mac is nvm.

You can use the install script for nvm installation.

relaunch your Terminals and check nvm version

List your installed node versions if any:

It is safe if you choose one of the most recent LTS (long time support) version and install it with the following command:

So if the latest LTS version of Node is 10.15.3

Setup this version as the default.

Check your node version with

In case, you want to upgrade node

To Uninstall Node

Switching between various nodes versions


npm is installed as a package with Node

Check the version

To upgrade npm


To install yarn

Check the version

Digital Nomad (

Digital Nomad (