Table of Contents
This article will show you how to Install Node.js and NPM on Windows and Mac. With the need for full-stack development and exponential growth, JavaScript has become a safe way to build a full-fledged business application. There are a number of backend and frontend frameworks and libraries that are built on JavaScript and work well together. Node JS is a technology that professionals like because it can be used to make a scalable server-side for apps that are strong and responsive.
You must install Node.js and the npm command line interface using either a Node version manager or a Node launcher to publish and install packages to and from the public npm registry or a private npm registry. Installing Node.js and npm is much easier if you use a Node version manager like nvm. We don’t suggest using a Node installer because the Node installation process puts npm in a directory with local permissions. When you run npm packages globally, this can cause permissions errors.
How to Install Node.js and NPM on Windows
Download the Installer
The Windows Installer can be downloaded from the NodeJs page. Make sure you have the most recent version of NodeJs downloaded. It has the NPM package manager built in.
Here, we choose the Node.js launcher for 64-bit systems. The version with “Long-term Support” (LTS) is the best choice for you. After you’ve downloaded the software package, double-click on it to set it up. Your computer will download an.msi file. Choose the place you want to do that.
Install Node.js and NPM
After picking the path, double-click.msi binary files to start the installation process. Then give permission to run the app. You’ll see a message saying “Welcome!” on the screen. Click the “Next” button. The process of setting up will begin.
- Choose the desired path where you want to install Node.js.
- By clicking on the Next button, you will get a custom page setup on the screen. Make sure you choose npm package manager , not the default of Node.js runtime . This way, we can install Node and NPM simultaneously.
You should have 143MB of space to install Node.js and npm features.The following features will be installed by default:
- Node.js runtime
- Npm package manager
- Online documentation shortcuts
- Add to Path
- Bang! The setup is ready to install Node and NPM. Let’s click on the Install button so hard!
Check Node.js and NPM Version
- If you have a doubt whether you have installed everything correctly or not, let’s verify it with “Command Prompt”.
- Command Prompt window will appear on the screen.
- To confirm Node installation, type
node -vcommand. - To confirm NPM installation, type
npm -vcommand. - And you don’t need to worry if you see different numbers than mine as Node and NPM are updated frequently.
How to Install Node.js and NPM on Mac
Download the .pkg Installer
- Click on the “ macOS Installer ” option to download the .pkg installer. Make sure you download it to your desired location.
Run Node.js Installer
- Now, your installer is ready to run. However, it will not take your much time.
Verify Node.js Installation
- To verify whether you have properly installed Node.js in your macOS, run the following command in your terminal:
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.
Update Your NPM Version
- Node.js doesn’t automatically update the version of npm.
- Write a given command and your npm version will be updated.
$ sudo npm install npm --global // Update thenpmCLI client
- Tadda! Node.js is there on your Mac system. Interesting, right? If you want to know more information about this visit official Apple support site.
FAQs
Visit https://nodejs.org/en/download/ and click on “Windows installer” to get the tools you need for your computer. The NPM package is part of the launcher. Choose 32-bit installer or 64-bit installer, depending on the machine you want to install, and continue.
It’s pretty easy to install js and NPM on Windows. You can download both of them from a link. Go to the Node installation page and download the software. Choose the working system you are using, and then go from there.