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
What Is A Mortgage Broker? | Bankrate
Cennox FireKing MB2720ICH-FK1 Depository Safe | B-Rated | Inner Compartment | Electronic Lock | 3.57 Cubic Feet
Swissport Ess
Bofa Financial Center Near Me
Phun Org Celebrity Extra
K-Active – Jetzt kaufen bei SVG
Byrn Funeral Home Mayfield Kentucky Obituaries
Https://Oneid.securitasinc.com
Autorcm
Inexpensive Auto Body Repair Near Me
Qtv Tutor Student Portal
Goddard, Paulette (1905–1990) | Encyclopedia.com
Fab Last Minute Cruises
Pokemon Infinite Fusion How To Get All Starters
Weather Underground Amarillo
Plusword 358
Terramia Brick Oven Pizza & Trattoria Menu
Meg 2: The Trench Showtimes Near Phoenix Theatres Laurel Park
Michelle_Barbelle
866-383-1604
Rent A Center Entertainment Center
What is Password-Based Authentication?
Knotty And Vixen
Does Cvs Sell Heavy Whipping Cream
1 P.m. Pdt
Move Relearner Infinite Fusion
The Year The Internet Stopped Laughing
Estes4Me Login
Remember those moving, 3D portraits from Harry Potter? They’re a real thing now! - Yanko Design
Craigslist For Cars Los Angeles
Ffxiv Icetrap Leaf
Papa Johns Mear Me
Buffalo Allergy Forecast
UTVs (Side by Sides) for Sale on NLC | NL Classifieds
Upcoming Events & Tickets | Thompson Boling Arena
Flixtor Nu Not Working
Dayz Improvised Shelter
Xxn Abbreviation List 2023
Wausau Craigslist Marketplace
Funny Walking Gif
Does Cvs Sell Heavy Whipping Cream
Fv-F Fv-G Pay Scale
OSCE | Internet Governance Forum
Community near Panama City Beach, FL 32413 - craigslist
Wi Dept Of Regulation & Licensing
Winchester Cooperative Bank Cd Rates
8.7 Increase Of 841
Syrie Funeral Home Obituary
K9Girllzz
Wow Irontree Branch
Williams Funeral Home Warrensburg Mo
Jennifer Maker Website
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.