To test out your Node and npm install, try installing Grunt (you might be asked to run with sudo): npm install -g grunt-cli Next, install Node (npm will be installed with Node): brew install node Next, add Homebrew’s location to your $PATH in your. Run the command below and follow any recommendations from brew doctor. brew updateĪs a safe measure you should run brew doctor to make sure your system is ready to brew. Then run brew update to make sure Homebrew is up to date. Install Node.js and npm with Homebrewįirst, install Homebrew.
However, if you’re a Homebrew fan like me and prefer to install all of your packages with it - ensuring your packages are installed using the same commands and directories and allowing Homebrew to easily manage upgrades and updates - then this guide will help you get started. The default method for installing Node.js is to download a pre-built installer for your platform, install it and make sure it’s on your $PATH. If you’re looking for an easy guide to install Node.js and npm on OS X and macOS - this is it.īefore we get started, are you listening to JS Party? If not, you should be! Maybe start with our episode all about best practices for Node developers.