Go to the bottom of the file, and enter the path you wish to add. Run the following command: sudo nano /etc/paths. Add to the PATH on Mac OS X 10.8 Mountain Lion and up. Npm global path prefix, Add to the PATH on Mac OS X 10.8 Mountain Lion and up installer finished, it recommended to add /usr/local/share/npm/bin to my path. You can run the installer like any other installation package on the Mac.
If you don’t want to use Homebrew for whatever reason, the other next easiest option is to use a the prebuilt installer from : Get the Node.js installer from. Installing Node.js & NPM on the Mac with a package installer. This should print the version number so you'll see something like this 1.4.27. How to Install Node.js and NPM on a Mac, To see if NPM is installed, type npm -v in Terminal. Homebrew downloads some files and installs them. A package, also called a module, is just a code library that extends Node by Installation Open the Terminal app and type brew install node. Installing Node.js® and NPM on Mac, NPM is a “package manager” that makes installing Node “packages” fast and easy. Get full access to this app and 150+ other on Setapp subscription. npm is distributed with Node.js- which means that when you download Node.js, you automatically get npm installed on Edit and run code in any programming language with just a single click.