Node.js Installation
Node.js Installation Instructions
Windows:
- Download Node.js:
- Visit the official Node.js website: Node.js Downloads.
- Download the recommended version for Windows. The installer usually has an
.msiextension.
- Run the Installer:
- Double-click the downloaded installer to run it.
- Follow the prompts in the Node.js Setup Wizard. You can usually leave the default settings.
- Verify Installation:
- Open a Command Prompt or PowerShell window.
- Type the following commands to check if Node.js and npm (Node Package Manager) are installed:
node -v npm -v - If installed correctly, you should see version numbers for Node.js and npm.
macOS:
- Install Node.js using Homebrew (optional):
- If you have Homebrew installed, you can use it to install Node.js:
brew install node
- If you have Homebrew installed, you can use it to install Node.js:
- Download Node.js:
- Visit the official Node.js website: Node.js Downloads.
- Download the recommended version for macOS. This is usually a
.pkgfile.
- Run the Installer:
- Double-click the downloaded installer to run it.
- Follow the installation instructions.
- Verify Installation:
- Open a terminal.
- Type the following commands to check if Node.js and npm are installed:
node -v npm -v - If installed correctly, you should see version numbers for Node.js and npm.
Linux (Ubuntu/Debian):
- Install Node.js using Package Manager:
- Open a terminal.
- Update the package list:
sudo apt update - Install Node.js and npm:
sudo apt install nodejs npm
- Verify Installation:
- Type the following commands to check if Node.js and npm are installed:
node -v npm -v - If installed correctly, you should see version numbers for Node.js and npm.
- Type the following commands to check if Node.js and npm are installed:
Linux (Fedora):
- Install Node.js using Package Manager:
- Open a terminal.
- Use DNF package manager to install Node.js and npm:
sudo dnf install nodejs
- Verify Installation:
- Type the following commands to check if Node.js and npm are installed:
node -v npm -v - If installed correctly, you should see version numbers for Node.js and npm.
- Type the following commands to check if Node.js and npm are installed:
Once Node.js is successfully installed, you can start using it to run JavaScript on your machine and to manage packages through npm. Remember to check the official Node.js documentation for any updates or additional information: Node.js Documentation.