JavaScript has become a popular language in the software development industry. Front-end developers are trying to use JavaScript development to create feature-rich UI and communicate with back-end Web services via AJAX. Due to this, web developers working on the server side have shifted their paradigm to JavaScript. On that note, we will look at how to install NodeJS and NPM on Windows and Mac systems.

How to Install NodeJS and NPM on Windows and Mac?

Today, many front-end frameworks such as TezJS, VueJS, React, Angular, etc., are using JavaScript as their primary language. Thanks to its code optimization features. When you choose JavaScript development services, you have many opportunities to master a single language while developing “full-stack” web applications. And the critical key to this server-side JavaScript revolution is NodeJs.
Now let us understand what Node.js is.

How to Install NodeJS and NPM on Windows and Mac

Here’s a brilliant comparative study on Full-Stack vs MEAN Stack vs MERN Stack!! –>


It is a cross-platform environment that executes JavaScript codes outside the browser. NodeJS is a version of Chrome’s V8 JavaScript runtime engine that lets you develop server-side JavaScript applications. It comes with everything needed to run a program written in JavaScript. Thus, it allows you to run web applications outside of the client’s browser.

It was developed in 2009 by Ryan Dahl. Since it uses an asynchronous, event-driven model, it is the best option for building data-intensive applications.
According to a survey by Stack Overflow, NodeJS is the most popular web-dev technology as of 2022. With a “single threaded event loop” architecture, NodeJS manages multiple concurrent clients simultaneously. The processing model of Node.js is based on the event-based model of JavaScript as well as the JavaScript callback mechanism.

Now, that you know about NodeJS, let’s see how to install NodeJS and also the Node Package Manager (the default package manager for NodeJS), popularly known as NPM.

Prerequisites –>

  • RAM >4GB
  • CPU Intel Core i3TM i3 HQ CPU @2.50 GHz
  • ROM >256GB
  • Required Software :- Chocolatey

Here’s a quality read on how to export NodeJS!! –>

Node Package Manager (NPM)

We already know that NPM is the default package manager for NodeJS. NPM allows open source web developers to share and borrow packages for application development. It also serves as a command line utility for the application to install packages in the project, manage dependencies and even version management.

Components of NPM –>

  • Website: You can find packages for your project and also set up profiles to manage these projects on the official NPM website.
  • Command line interface (CLI): To work with NPM packages and repositories, there is NPM’s Command Line Interface.
  • Registry: NPM also has a huge database of JavaScript projects and metadata.
How to Install NodeJS and NPM on Windows and Mac

How to Install NodeJS and NPM on Windows?

Now, let’s see how to install NodeJS on Windows. So, here’s the first step:

  • Download the Installer (the latest version with the apt. bit version).
  • Thereafter, double click on it and install it. You can save that .msi file in your desired location.
  • Also, make sure you select your NPM package manager, not the default Node.js runtime, to facilitate installing Node and NPM at the same time.
  • That’s it! Your setup is ready to install Node and NPM.
  • Now, click on the download button to start the process.
# To confirm the installation of Node
$ node -v command.

# To confirm the NPM installation
$ npm -v command.

How to Install NodeJS and NPM on Mac?

Now, let’s see how to install NodeJS on Mac. So, here’s the first step:

  • Download the .pkg installer
  • Thereafter, save it to a desired location.
  • Next, launch the Node.js Installer using the following steps:
    • Introduction –> Continue License
    • Choose Next –> Agree to Installation Type
    • Install –> Authenticate with your Mac to allow installation
    • Install Software Summary –> Close
  • Verify your NodeJS Installation using the below command:
$ node -v
How to Install NodeJS and NPM on Windows and Mac
  • Now, you will need to update your NPM version, using the below commands:
$ sudo npm install npm --global
  • Thereafter, set the “NODE HOME” variable in the system environment variables.
$ export PATH =/usr/local/git/bin:/usr/local/bin:$PATH
  • Actually, it is advisable to write this command in .bash_profile or .zshrc.
  • However, it depends on which shell you use so that this path export remains on your system and cannot be recognized by all terminal instances.
  • That’s it! You have successfully installed NodeJS on your MacOS device.

Here’s a quality read on the Web Development Wars – Laravel vs Core PHP!! –>

Using “HomeBrew” to install NodeJS –>

Homebrew is an open source and free software package management system that simplifies the installation process on macOS and Linux. It installs the packages into their directory and their files into /usr/local. Here are the steps to install NodeJS using Homebrew:

  • Run the below command in your terminal.
$ brew install node
  • Thereafter, verify that the installation is successful, using the below commands:
$ node -v
$ npm -v
  • Thereafter, update your Homebrew version, using the below command:
$ update brew
  • Finally, use the below command to upgrade the version of NodeJS
$ brew upgrade node


By now, I can safely, vouch that you have definitely got the answers to your question, how to Install NodeJS and NPM on Windows and Mac?. Not only that, you have also come to know about various other facets related to NodeJS and NPM. So, all in all, you have acquired a great deal of knowledge. With that, do remember, if you’ve any confusion or questions thus whatsoever about this topic, you can always reach out to me in the comments section and I will readily try to help. On that note, until the next time, see ya!! Goodbye!!

Categorized in: