Installing Node.js on Mac using package manager

suggest change

Homebrew

You can install Node.js using the Homebrew package manager.

Start by updating brew:

brew update

You may need to change permissions or paths. It’s best to run this before proceeding:

brew doctor

Next you can install Node.js by running:

brew install node

Once Node.js is installed, you can validate the version installed by running:

node -v

Macports

You can also install node.js through Macports.

First update it so the newest package list is used:

sudo port selfupdate

Then install a current Node port. The name includes the major version:

sudo port install nodejs22

You can now run node through CLI directly by invoking node. Also, you can check your current node version with

node -v

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents