To run JavaScript outside a browser or use frameworks like React or Express, you need Node.js. Let's see how to install Node.js on Windows, Linux, and Mac systems, ensuring you’re ready for JavaScript development.
Installing Node.js on WindowsIn this section, we'll discuss the three different methods that can used to download and install Node.js for Windows users.
1. Download and Install Node.js from the Official Website Step 1: Download the Node.js InstallerVisit the official Node.js download page and choose your suitable download either long-term support (LST) version 22.12.0 or the current version v23.3.0
Official website Step 2: Run the Node InstallerOpen the .msi
installer once downloaded.
During installation, make sure to add Node.js to your PATH to ensure that both Node.js and npm are accessible globally in the command line.
Step 3: Verify InstallationOpen Command Prompt and run the following to check if Node.js and npm are correctly installed:
node -v
npm -v
This will display the installed versions of Node.js and npm.
2. Install Using Windows Package Manager (Winget) Step 1: Open PowerShell as AdministratorRight-click the Start menu and select Windows PowerShell (Admin).
Admin Access Step 2: Install Node.js via WingetExecute the following command to install Node.js:
winget install OpenJS.Node.js
PowerShell
Also, check the installed versions of Node.js and npm once the installation is complete using the following command:
3. Install using WSL(2) *recommended Step 1: Enable WSL (Windows Subsystem for Linux)node -v
npm -v
Open PowerShell as Administrator and run the following command:
wsl --install
WSL
Choose your preferred Linux distribution (Ubuntu is widely used).
Step 2: Install Node.js on WSLOnce your Linux subsystem is set up, you can install Node.js via your chosen Linux distribution:
WSLsudo apt update
sudo apt install Node.js npm
Later, you can run the following commands to verify the installation:
Install Node.js on macOSnode -v
npm -v
You may download and install node on macOS using these 3 defined methods below, let's check them out along with their steps:
1. Download and Install Node.js via Homebrew Step 1: Install HomebrewOpen Terminal and run the following command to install homebrew version 23.3.0 (if you haven’t already):
Brew/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Step 2: Install Node.js
After Homebrew is installed, run the following command to install Node.js:
Terminalbrew install node
Once the installation is complete, you may check if Node.js and npm are successfully installed by running:
verify 2. Install Node.js from the Official Websitenode -v
npm -v
Node js offer users to get the download done from it's official website as well and this might be the simplest method to download and install Node in your system.
Step 1: Download the macOS Installer v23.3.0Visit the Node.js official site and download the macOS installer for either the LTS v22.12.0 or Current version v23.3.0
Node Step 2: Run the InstallerOpen the downloaded .pkg
file and follow the instructions to complete the installation.
Once installed, open Terminal and check the Node.js and npm versions:
Verify the installer 3. Install Node.js Using NVMnode -v
npm -v
Step 1: Install NVM
Run the following command to install NVM (a version manager for Node.js):
macOScurl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
Step 2: Install Node.js Using NVM v22.12.0 (LTS)
After NVM is installed, you can install any version of Node.js:
nvm install node # Installs the latest version of Node.js
Also, you can verify Installation using the following command
verify Install Node.js on Linuxnode -v
npm -v
Now, we'll be discussing the 3 methods to Install Node on your Linux system.
1. Install Node.js Using APT (For Ubuntu/Debian-based Distributions) Step 1: Update the Package List v22.12.0 (LTS)Go to Terminal and execute the following command:
sudo aptsudo apt update
Step 2: Install Node.js on your System
Now, run the following command to Install Node.js and npm:
sudo Installsudo apt install Node.js npm
Step 3: Verify Installation
Once the installation is complete, you may check the installed versions using the following command:
2. Install Node.js Using DNF (For Fedora) Step 1: Install Node.js for Fedora 41node -v
npm -v
Open Terminal and run
sudosudo dnf install Node.js
Step 2: Verify Installation
After installation, verify Node.js and npm by using the following command:
verify 3. Install Node using NVM Step 1: Install NVM v22.12.0 (LTS)node -v
npm -v
Run this command to install NVM, which helps manage different versions of Node.js:
install.shcurl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
Step 2: Install Node using NVM
After installing NVM, run
nvm install node # Installs the latest version
Installation Step 3: Verify Installation
Run the following command to verify node installation:
verify installation Troubleshooting Common Issues Issue 1: Node.js Not Added to PATHnode -v
npm -v
If node
or npm
commands are not recognized, ensure Node.js is added to your system’s PATH. This is particularly common with manual installation methods.
When installing Node.js globally, you may face permission issues. You can resolve this by running the commands with sudo
(on Linux/macOS) or by using an administrator account (on Windows). Alternatively, use NVM to avoid these problems.
If you're using an outdated version of Node.js or npm, you can upgrade to the latest version by running:
npm install -g npm
Key Takeaways
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4