How to Install Node.js and NPM on Windows and Mac

Node.js has been taking the world by storm. Developers have said that “JavaScript is eating software” because Node.js has been used to build so many systems. The popular package manager npm is a big part of Node’s success. This article is about How to Install Node.js and NPM on Windows and Mac.

It makes it easy for JavaScript programmers to share useful packages like lodash and moment. More than 1.3 million packages have been made available because of npm, and more than 16 billion packages are downloaded every week. These numbers are great for any piece of software.

Node.js’s default package manager is NPM, which stands for “Node Package Manager.” It also goes by the names “Ninja Pumpkin Mutants,” “Nonprofit Pizza Makers,” and a bunch of other random names that you can check out at npm-expansions and maybe even add to.

How to Install Node.js and NPM on Windows

How to Install Node.js and NPM

Since we have decided to use Node.Js to make an app, the first thing you need to do is install Node.Js on your Windows system. Here, we will go through each step of the installation process. So, let us start at the beginning.

Step 1: Download the Installer

  • Download the Windows Installer from the NodeJs website. Make sure you downloaded the latest version of NodeJs. It contains the NPM package manager.
  • Here, we are picking the 64-bit version of the Node.js installer.
  • The LTS (Long-term Support) version is strongly suggested for you. After downloading the installation package, double-click it to install it.
  • Now .msi file will be downloaded to your browser. You can do that wherever you want.

Step 2: Install Node.js and NPM

After choosing the path, double-click.msi binary files to start the installation process. Then give access to run the application.

You will see a message saying “Welcome!” on the screen. Click the “Next” button. The process of setting up will begin.

  • Choose the path where you want Node.js to be installed.
  • When you click the Next button, a custom page will appear on the screen. Make sure you pick npm package manager instead of Node.js runtime, which is the default. So, we can install both Node and NPM at the same time.

You should have at least 143MB of space to install Node.js and npm features. The following features will be installed by default:

  • Shortcuts for the Node.js runtime, the NPM package manager, and the online documentation
  • Add to the Way

The setup is ready to install Node and NPM. Let us push so hard on the Install button!

Step 3: Check Node.js and NPM Version

If you are not sure if everything was installed correctly, you can check with “Command Prompt.”

  • Command Prompt window will appear on the screen.
  • To confirm Node installation, type node -v command.
  • To confirm NPM installation, type npm -v command.

You do not have to worry if the numbers you see are different from mine because Node and NPM are updated often.

How to Install Node.js and NPM on Mac

Now, if you are using macOS, let us talk about how to install Node.js and NPM.

Install Node Using .pkg Installer

Well, it works the same way as Windows. Here, Node provides a .pkg installer for Mac. We can also download it from the site’s official page.

Step 1: Download the .pkg Installer

If you click “macOS Installer,” the.pkg installer will be downloaded. Make sure you save the file where you want to.

Step 2: Run Node.js Installer

Now, you can run your installer. But you will not have to spend much time on it. So, let us explain in detail here.

  • Introduction > Continue License > Select Continue > Agree Installation Type > Install > Authenticate with your Mac to allow the Installation > Install Software Summary > Close

Step 3: Verify Node.js Installation

Run the following command in your terminal to check if Node.js was installed correctly on your macOS:

  • node -v node -v // The command we ran – tests the version of Node.js that’s currently installed v12.13.0 // The version of Node.js that’s installed. It can be some other version.

Step 4: Update Your NPM Version

Node.js does not update the version of npm on its own.

If you type a given command, the version of npm will be updated.

  • $ sudo npm install npm –global // Update thenpmCLI client

Node.js is already installed on your Mac.

FAQ

What is npm install?

With npm install, a package and all of its dependencies are downloaded. You can run npm install with or without arguments. When run without any arguments, npm install downloads the dependencies listed in a package.json file and creates a node modules folder with the installed modules.

Do I need Node.js for npm?

You must install Node.js and the npm command line interface using either a Node version manager or a Node installer to publish and install packages to and from the public npm registry or a private npm registry.

Why do we run npm install?

It helps install different packages and take care of their dependencies. It helps you a lot with developing Node. NPM helps you install the different modules you need for web development and does not just give you a bunch of features you might never use.

Why we use in npm install?

npm stands for Node Package Manager. It is both a library and a registry for software packages that use JavaScript. npm also has tools you can use from the command line to help you install packages and manage how they depend on each other.

Lucas Simonds
Lucas Simonds
Lucas Simonds is a skilled content editor at Bollyinside, specializing in "How to" and "Tips & Tricks" articles focused on Gaming, Software, and Apps. With a genuine passion for video games, he not only writes about them but also actively engages in gaming. His commitment to providing insightful and approachable content has earned him a trusted reputation within the online community.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Related Articles

Hubspot Service Hub review 2024: a comprehensive platform

When it comes to customer support operations, HubSpot Service Hub is an all-encompassing customer service platform that is meant to...
Read more
When players on Windows 11 or 10 try to log in to Steam, they may get the error code E87....
Users of Windows 11 or 10 may find it frustrating to deal with the error number 147-0 in Microsoft Office....
The Microsoft Store is an important part of the Windows operating system because it gives users a single place to...
It can be hard to find the right balance between usefulness, durability, and cost when it comes to kitchen storage....
Both AirDroid and Vysor are well-known tools that help Android users control their devices and mirror them. One of the...