Install Node & NPM on macOS (Homebrew, NVM, Official Installer)
Install Node & NPM on macOS (Homebrew, NVM, Official Installer)
Using Homebrew (Recommended)
brew install nodeUsing Node Version Manager (NVM)
NVM allows you to install and manage multiple Node.js versions:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
source ~/.zshrc
nvm install --lts
nvm use --ltsUsing Official Installer
- Download the installer from nodejs.org
- Run the downloaded
.pkgfile - Follow the installation wizard
Verify Installation
node --version
npm --versionIf these commands output the current versions, the installation was successful.
Last updated on