On this page
Installing Node.js
Linux (CentOS/RHEL using yum)
- Add Node.js Yum Repository:
curl -sL https://rpm.nodesource.com/setup_14.x | sudo bash -
- Install Node.js and npm:
sudo yum install -y nodejs
- Verify Installation:
node -v
npm -v
Linux (Ubuntu/Debian using apt)
- Add Node.js PPA (Personal Package Archive):
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
- Install Node.js and npm:
sudo apt install -y nodejs
- Verify Installation:
node -v
npm -v
macOS
- Install Node.js with Homebrew:
brew install node
- Verify Installation:
node -v
npm -v
Windows
-
Download Node.js Installer:
- Download the Node.js installer from the official Node.js website.
-
Run Installer:
- Run the downloaded
.msi
installer and follow the installation wizard instructions.
- Run the downloaded
-
Verify Installation:
- Open Command Prompt or PowerShell and check Node.js and npm versions:
node -v
npm -v