Installing Node.js® and NPM on Mac (2024)

What’s Node.js® and NPM?

Node.js® is a JavaScript-based environment which you can use to create web-servers and networked applications. You can also use it to perform helpful tasks on your computer such as concatenating and minifying JavaScript files and compiling Sass files into CSS.

NPM is a “package manager” that makes installing Node “packages” fast and easy. A package, also called a module, is just a code library that extends Node by adding useful features. For example, the “request” module simplifies the process of making HTTP requests so you can easily get web resources from other sites.

NPM is installed when you install Node.js®

Although there is Mac installer program on the Node website, we recommend using Homebrew to install and update Node.

Prerequisites

  • You should have some familiarity with the Mac Terminal application since you’ll need to use it to install and test Node and NPM. You’ll also need the Terminal to use Node.js and NPM. The Terminal application is located in the Utilities folder in the Applications folder.
  • Dependencies. Although you can install Node in other ways, we recommend using Homebrew. Homebrew lets you avoid possible security problems associated with using the sudo command to install software like Node and Node modules.

Installation Overview

Installing Node.js® and NPM is pretty straightforward using Homebrew. Homebrew handles downloading, unpacking and installing Node and NPM on your system. The whole process (after you have Homebrew installed) should only take you a few minutes.

Installation Steps

  • Open the Terminal app and type brew update. This updates Homebrew with a list of the latest version of Node.
  • **Type brew install node.
  • Sit back and wait. Homebrew has to download some files and install them. But that’s it.

Test it!

Make sure you have Node and NPM installed by running simple commands to see what version of each is installed:

  • Test Node. To see if Node is installed, type node -v in Terminal. This should print the version number so you’ll see something like this v0.10.31.
  • Test NPM. To see if NPM is installed, type npm -v in Terminal. This should print the version number so you’ll see something like this 1.4.27

Installing Node.js® and NPM on Mac (1)

How to Update Node and NPM

New versions of Node and NPM come out frequently. You can use Homebrew to update the software it installs.

  1. Make sure Homebrew has the latest version of the Node package. In Terminal type brew update
  2. Upgrade Node: brew upgrade node

How to Uninstall Node and NPM

You can use Homebrew to uninstall packages that it installed:

brew uninstall node

Installing Node.js® and NPM on Mac (2024)
Top Articles
My Wall Street, My Financial Future - Invest Independently for Success
My uncle retired early at age 56 after living by 3 money rules his whole life
jazmen00 x & jazmen00 mega| Discover
Satyaprem Ki Katha review: Kartik Aaryan, Kiara Advani shine in this pure love story on a sensitive subject
30 Insanely Useful Websites You Probably Don't Know About
America Cuevas Desnuda
Directions To 401 East Chestnut Street Louisville Kentucky
Our History | Lilly Grove Missionary Baptist Church - Houston, TX
Koop hier ‘verloren pakketten’, een nieuwe Italiaanse zaak en dit wil je ook even weten - indebuurt Utrecht
Rosemary Beach, Panama City Beach, FL Real Estate & Homes for Sale | realtor.com®
Premier Reward Token Rs3
Burn Ban Map Oklahoma
Condogames Xyz Discord
Gdlauncher Downloading Game Files Loop
1-833-955-4522
Grayling Purnell Net Worth
Tamilyogi Proxy
Craigslist West Valley
Beryl forecast to become an 'extremely dangerous' Category 4 hurricane
Winco Employee Handbook 2022
Dragonvale Valor Dragon
R. Kelly Net Worth 2024: The King Of R&B's Rise And Fall
The Listings Project New York
Defending The Broken Isles
What Individuals Need to Know When Raising Money for a Charitable Cause
Skycurve Replacement Mat
Anonib Oviedo
Piedmont Healthstream Sign In
Encore Atlanta Cheer Competition
Craigslist Brandon Vt
Japanese Emoticons Stars
Angela Muto Ronnie's Mom
Gasbuddy Lenoir Nc
Teenbeautyfitness
T&J Agnes Theaters
Timothy Kremchek Net Worth
Pinellas Fire Active Calls
Michael Jordan: A timeline of the NBA legend
Winco Money Order Hours
Myanswers Com Abc Resources
Fototour verlassener Fliegerhorst Schönwald [Lost Place Brandenburg]
O'reilly's Palmyra Missouri
Ukraine-Krieg - Militärexperte: "Momentum bei den Russen"
At Home Hourly Pay
Academic Calendar / Academics / Home
Denise Monello Obituary
Gas Buddy Il
Canada Life Insurance Comparison Ivari Vs Sun Life
Meet Robert Oppenheimer, the destroyer of worlds
Theater X Orange Heights Florida
The 13 best home gym equipment and machines of 2023
Latest Posts
Article information

Author: Chrissy Homenick

Last Updated:

Views: 6710

Rating: 4.3 / 5 (74 voted)

Reviews: 81% of readers found this page helpful

Author information

Name: Chrissy Homenick

Birthday: 2001-10-22

Address: 611 Kuhn Oval, Feltonbury, NY 02783-3818

Phone: +96619177651654

Job: Mining Representative

Hobby: amateur radio, Sculling, Knife making, Gardening, Watching movies, Gunsmithing, Video gaming

Introduction: My name is Chrissy Homenick, I am a tender, funny, determined, tender, glorious, fancy, enthusiastic person who loves writing and wants to share my knowledge and understanding with you.