Node.js and NPM can be installed, upgraded, and removed quickly through Homebrew under MacOS all versions: Mojave, High Sierra, Sierra, El Capitan, Yosemite, Mavericks, Mountain Lion, Lion, Leopard, Snow Leopard.
- If Homebrew has not been installed, take a look on this tutorial to see how to install Homebrew properly into MacOS.
- If Homebrew was installed already, enter the following command line through Terminal (Found under /Applications/Utilities/).
- Install XCode: Download and install from Apple App Store.
Install Node.js and NPM
Enter the following command line to install Node.js and NPM on Mac:
brew install node
To upgrade Node.js and NPM
brew upgrade node
To Remove Node.js and NPM
brew uninstall node