If you want to install npm the package manager for NodeJS you can make use of the brew package manager.
Step 1: Make sure Brew is Installed
The first thing we do is check if HomeBrew is installed on the Mac using the command, brew --version

If you see an error - "zsh: command not found: brew" then run the below command in your Terminal to install brew first.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Step 2: Installing npm
Now we are good to install npm, simply run the below command in Mac Terminal.
brew install node
Once the installation is done, you can check if was installed correctly using the below commands.
macOS % node -v
v20.4.0
macOS % npm -v
9.7.2
-
Facing issues? Have Questions? Post them here! I am happy to answer!
More Posts related to MacOS,
- Clear Screen shortcut macOS Terminal
- What is macOS Ventura?
- [fix] How to Show file extensions on all files on Mac
- How to Find Where Mac Terminal App is Located?
- AutoSave button not working on Office on Mac (Word, Excel or Powerpoint)
- macOS say command text to speech using various voices and languages
- How to change Ping TTL value on macOS
- Open .bash_profile File in TextEdit using Terminal
- How to know the Safari Version on Mac
- How to Copy full Absolute Path of a File on Mac
- 13.0 MacOS Ventura release date
- Enable spell check in Sublime Text (macOS)
- How to Display Analog Clock on Mac Menu Bar
- How to turn off Location Services macOS Ventura 13
- How to Open VS Code on Mac
- Add Bookmark macOS Safari
- How to Fix cd: too many arguments Error in Terminal: A Step-by-Step Guide
- How to install wget on macOS
- Select Line Number TextEdit on Mac
- Strikethrough Text in Excel for Mac
- How to Enable or Disable Dark Mode on macOS Ventura 13
- How to hide or display Wifi icon in macOS Bug Sur Menu Bar
- How to install Yarn on Mac (macOS)
- How to fix command not found brew (bash, zsh) on macOS Terminal
- How to Schedule Mails in macOS Ventura
More Posts:
- Installing Android Studio Dolphin on Mac with Apple (M1/M2) Chip - Android-Studio
- Lost your iPhone? Regenerate QR Code for Microsoft Authenticator App - Microsoft
- Import Other Python Files Examples - Python
- How to send WhatsApp message from your Android App using Intent - WhatsApp
- How to Add Brew to PATH M1/M2 Mac - MacOS
- How to Whitelist IP Address on GoDaddy Hosting? - HowTos
- BSNL Broadband upgrades speed to minimum 2MBps for all users 512Kbps 1Mbps - HowTos
- Setting Java_Home Environment variable on Windows Operating System - Java