If you’re getting into JavaScript development — whether for web apps, backend projects, or tools like React and Vue — you’ll need Node.js and npm. Node.js lets you run JavaScript outside a browser, while npm (Node Package Manager) helps you install and manage packages that make development easier.
In this guide, we’ll walk you through how to install Node.js and npm on Windows 11, verify the installation, and make sure everything runs smoothly for your development setup.
What Are Node.js and npm?
Before jumping into installation, let’s quickly clear up what these two are:
- Node.js is a JavaScript runtime that allows you to run JavaScript code on your computer, outside of a browser. It’s built on Chrome’s V8 engine and is perfect for building backend services, APIs, and command-line tools.
- npm (Node Package Manager) comes bundled with Node.js and is used to install third-party libraries and frameworks — like React, Express, or Angular — directly into your projects.
You don’t need to install npm separately; it comes automatically with Node.js.
Install NPM and Install Node.js in Windows 11
1. Download Node.js for Windows 11
- Open your browser and go to the official Node.js download page.
- You’ll see two main versions:
- LTS (Long-Term Support) – Recommended for most users. It’s stable and reliable.
- Current – Includes the latest features but may not be as stable.
- Click “Windows Installer (.msi)” under the LTS version to download the installer.
This will download a .msi setup file (for example, node-v20.x.x-x64.msi).
2. Run the Node.js Installer
Once the file is downloaded, you can begin the installation:
- Double-click the
.msifile to start the setup wizard. - When prompted, click Next to continue.
- Accept the License Agreement and click Next.
- Choose the installation directory (it’s best to leave it as default).
- On the Custom Setup screen, make sure npm package manager is checked — it’s included by default.
- Keep clicking Next, then click Install.
When the setup finishes, click Finish to exit the installer.
3. Verify Node.js and npm Installation
After installation, let’s make sure everything is working correctly.
- Press Windows + X and choose Windows Terminal or Command Prompt.
- Type the following command to check Node.js version:
node -vYou should see something like:v20.11.1 - Next, check npm version:
npm -vYou should see a version number like:10.2.3
If both commands return version numbers, congratulations — Node.js and npm are installed successfully on your Windows 11 system.
4. Update npm to the Latest Version (Optional)
npm is updated frequently, and you can easily upgrade it to the latest version.
In your terminal, run:
npm install -g npm@latest
This installs the latest npm globally on your system.
To confirm the update, check the version again using:
npm -v
5. Set Up the PATH Environment Variable (If Needed)
Usually, the Node.js installer automatically adds Node and npm to your system PATH.
However, if you ever get an error like 'node' is not recognized as an internal or external command', you’ll need to add it manually.
Here’s how:
- Press Windows + S and search for Environment Variables.
- Click Edit the system environment variables.
- In the System Properties window, click Environment Variables.
- Under System variables, select Path, then click Edit.
- Click New, and add these two paths (adjust if your version differs):
C:\Program Files\nodejs\C:\Users\<YourUser>\AppData\Roaming\npm - Click OK on all windows to save your changes.
Then, restart your terminal and try running node -v again — it should now work perfectly.
6. Test npm by Installing a Package
To confirm npm is working properly, you can install a test package.
For example, install the http-server package (a lightweight web server) globally:
npm install -g http-server
Once it installs, you can run:
http-server
If you see “Starting up http-server” and a local URL (like http://127.0.0.1:8080), npm is functioning correctly.
7. Uninstall Node.js (If You Need to Reinstall or Remove It)
If you ever need to uninstall Node.js, you can do it through the Control Panel:
- Press Windows + R, type
appwiz.cpl, and hit Enter. - Scroll through the list of installed programs and select Node.js.
- Click Uninstall, then follow the on-screen instructions.
This removes both Node.js and npm from your system.
You can always reinstall the latest version from the official Node.js website.
Conclusion
Installing Node.js and npm on Windows 11 is quick and straightforward — and it’s the first step toward building powerful JavaScript-based applications.
With Node.js installed, you can now run JavaScript outside the browser, build backend servers, and use npm to install thousands of useful packages for your projects.
Now that your setup is complete, you’re ready to dive into frameworks like React, Express, or Next.js — all powered by Node.js and npm.