How to Install Node.js on a Mac?

Posted by Prem Tiwari | Updated on

Node.js is only required for using any JavaScript tool for creating server-side JavaScript applications. Here I am sharing how to install Node.js on a Mac machine.

How to Install Node.js on a Mac?

  1. Open the Terminal by pressing Command+Space and search Terminal then pressing Enter.
  2. Check node version by node - v if  you have already installed.
  3. If you have already installed Node.js, you will see current installed node version.
    1. Update to the latest version using npm i -g npm. If you get a bunch of checkPermissions warnings, you should run the command as the superuser like this: sudo npm i -g npm
    2. You now have the latest version installed. You do not need to continue with these instructions.
  1. If you do not have Node.js installed, it will output something like -bash: node: command not found. Continue with these instructions to install it.
  2. Open nodejs.org site and download the latest version node for MacOS and install it.
  3. Once you done with installation, again check the node version by using the node - v command in your terminal.

That’s it! I hope it helped you!


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers