Introduction to Node JS and npm
‘npm’ stands for “Node Package Manager”. It lets developers install, update, as well as handle dependencies such as frameworks and libraries. npm provides a vast repository of open-source packages, which can be leveraged to create web applications rapidly and efficiently.
If you want to know how to install npm in Windows 10 and start building web apps, you’ve stumbled across the right read!
When amalgamated, Node.js and npm bestow an influential toolset for crafting contemporary, scalable web applications. If you are aiming to hone proficiency in the dynamic field of web development, consider getting started with a Master of Science in Computer Science.
Let’s find out how to install npm on Windows 10!
Also, Checkout technology-free courses
System Requirements for Installing Node JS and npm on Windows 10
Here are all the system requirements to install Node JS and npm on your Windows 10:
- Windows 10 Operating System
- 4 GB of RAM
- 10 GB of free space
Downloading Node JS and npm Installation Files
You can download Node.js after determining your computer meets the minimum requirements. The official Node.js website has documentation that can be followed.
To begin, get the installer from the official website. Select the desired download version by clicking on it. When you click the button, the download will start immediately, and the file will be saved as a ‘.msi’ extension file in your downloads directory.
It is prudent to note that some antivirus software may impede the installation of Node.js and npm or signal them as potential threats. If you encounter any such obstacles during the installation, you might have to temporarily deactivate antivirus software or establish exemptions for Node.js and npm in your antivirus settings.
Installing Node JS and npm on Windows 10 Using Installer
Once the ‘.msi’ file is downloaded, execute the file. This should open a pop-up where you allow access for the file to execute. After you’ve allowed access to run the installer, you can follow the instructions to accept the licence agreement. When you agree to the terms and conditions of the licence agreement, the installer should redirect you to the path where you want Node.js to be installed.
By default, the installer should augment Node.js to your system PATH, which facilitates access to these tools from any directory within the command prompt or PowerShell.
However, if you prefer to install it in a custom location on your local drive, you must add the PATH to the system environment variables. To do this, search for ‘Edit the system environment variables’ on your Windows search bar and proceed by adding the PATH you’ve installed it to on your system to the environment variables.
Installing Node JS and npm on Windows 10 Using Chocolatey
Chocolatey is a prominent package manager for Windows, lauded for its capability to administer software packages easily. It provides a command-line interface for Windows users to set up, configure, and manage a wide variety of software products.
Chocolatey is renowned for its similarities to other package managers, such as apt-get in Linux and Homebrew in macOS.
Chocolatey executes instructions using a command-line interface which allows you to install a wide variety of software packages by typing in the necessary codes. You can use Chocolatey to install a whole lot of packages, including Node.js, Python, Git, and many more.
Below are the steps to install Node.js using Chocolatey, note that you should uninstall any existence of Node.js from your computer before you proceed with the steps down below.
- Open Windows Powershell
- Type ‘Get-ExecutionPolicy’
- If the output comes out as restricted, then type: ‘Set-ExecutionPolicy AllSigned’.
- You will get a prompt saying Yes or No; choose Yes.
- Install Chocolatey before installing Node.js by typing in: Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString(‘https://chocolatey.org/install.ps1‘))
- You should get a long output.
- Then go ahead and type in: choco install -y –force nodejs
- Check whether Node.js has been installed by typing in: node -v on your command prompt.
Now you know how to install npm on Windows 10 using Chocolatey. We understand that this all might seem a bit difficult to implement. To make things easier, consider joining a Full Stack Software Development Bootcamp.
Installing Node JS and npm on Windows 10 Using Scoop
Now that we’ve learnt how to install node js Windows using Chocolatey, we can proceed on how to install npm in Windows 10 using Scoop.
Scoop is also a package manager like Chocolatey. To install Node.js on Windows 10 using Scoop, follow the steps down below:
- Open Powershell and type in: iwr -useb get.scoop.sh | iex to install Scoop.
- Once Scoop is installed, type in: scoop install node.js . This will start installing node.js on your system.
You’ve now successfully learned how to install node js Windows using Scoop.
Verifying the Installation of Node JS and npm on Windows 10
After setting up Node.js and npm packages, you can verify their functionality using a test. If you want to view the output, type “node -v” and “npm -v” into the command line or PowerShell. Both the Node.js and npm versions can be retrieved using the aforementioned codes.
Explore our Popular Software Engineering Courses
Updating Node JS and npm to the Latest Version
To update both Node.js and npm, you have to execute certain steps. You should definitely refer to the documentation on their official website. This will help you mitigate any hindrances you might encounter while updating both Node.js and npm.
With the documentation guide on your side, follow the steps mentioned below:
- Open command prompt or Windows Powershell
- Type in node-v and npm -v to check the existing version of both.
- To update npm, simply type in: npm install -g npm
- To update Node.js to its latest version, type in: n latest. This command will ensure that you are installing the latest version of Node.js on your system.
- Re-check the new versions by following step 2.
Uninstalling Node JS and npm from Windows 10
To uninstall Node from your system, follow the steps below:
- Navigate to the “Apps and Features” section of the Windows 10 settings menu.
- Search for “Node.js” on the list of installed apps.
- Click on Uninstall.
The uninstallation process might take a few minutes to complete. Once completed, you’ll receive a pop-up notifying you of the same.
Note: The uninstallation process can leave residual files or registry entries behind, impacting future installations or updates. To ensure a clean and complete uninstallation, you might also want to manually remove any remaining files or directories associated with Node.js.
In-Demand Software Development Skills
Node.js and npm offer developers an exceptional toolset for building a robust backend for their web apps. Accessing the vast repository of open-source packages allows you to start creating innovative and efficient web apps easily. By mastering Node.js, you can easily improve the server side of your application and build modern, data-intensive, real-time applications.
upGrad’s Executive Post Graduate Programme in Software Development – Specialisation in Full Stack Development
If you’re an individual who wants to get into web development or Full Stack Development, to be precise, then you’d have to acquire a vast array of skills, starting from the front end to the back end. If you’re looking for a relevant program, upGrad’s Executive Post Graduate Programme in Software Development – Specialisation in Full Stack Development is here to mitigate all your problems!
With more than 7 case studies and projects, an exclusive placement portal, one-on-one mentorship sessions and interview preparation, this programme is guaranteed to turn you into a proficient Full Stack developer.
So what are you waiting for? Enrol now!
What is Node.js used for?
Node.js is commonly used to design and develop a web application's back end or server side. The server side communicates data to the client/ front end side.
Is it necessary to install npm(Node Package Manager)?
Although it is not necessary to install npm, it is recommended that you use npm for installing dependencies for Node.js. You can also choose to use Chocolatey or Scoop if you desire.
Can I install multiple Node.js versions on my system?
By using version managers like Node Version Manager, nvm or n, you can easily have access to more than one version of Node on your system.