Installing Node and Npm - IanMcC123/Stoopify GitHub Wiki

Installing Node.js and npm

Windows

1. Download Node.js Installer

Visit the official Node.js website: Node.js Downloads

Download the LTS (Long Term Support) version for Windows.

2. Run Installer

Run the downloaded installer.

  • Follow the installation wizard.
  • Accept the license agreement.
  • Choose the installation location.
  • Select components to install (npm comes bundled with Node.js).

3. Complete Installation

Click "Next" and then "Install" to start the installation.

4. Verify Installation

Open a command prompt or PowerShell and run the following commands to verify the installation:

node -v
npm -v

macOS

Using Homebrew

1. Install Homebrew

If you don't have Homebrew installed, open the Terminal and run the following command:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

2. Install Node.js and npm

Run the following command to install Node.js and npm using Homebrew:

brew install node

3. Verify Installation

Open a new terminal and run the following commands to verify the installation:

node -v
npm -v

Note: The Node.js installer carries the Node.js core file, and, consequently, the installation process installs both Node. js and npm from the installer file. Therefore, you don't need to install npm separately.