There’s some conflicting information out there about installing npm with homebrew, because the process has changed a couple times. For the time being, however, it’s a cinch. Just open up the terminal and run the following commands.
# Install node.js. npm will be installed along with it. brew install node # Verify that npm is installed. # If this command returns a filepath to npm, then it's there. which npm
And you’re done.