How to Install Node Js on Apple Mac M1

If you’re a developer and just started using the Apple Mac M1 computer and don’t know how to install Node Js on Mac M1, then do not worry. This guide will walk you through the steps to install Node Js on ARM x64 based Mac M1.

Node js is a backend javascript runtime environment that executes the javascript code outside the web browser. It is built on the V8 engine that is developed by the chromium project for google chrome.

Install Node Js on Mac M1

To install the Node Js natively on a Mac M1 computer, you will need to build the Node Js source code to ARM executable binary. To install the Node Js natively on Mac M1, you need to install the Homebrew package manager. Homebrew builds the Node Js sources code into ARM executable binary.

We already have detailed article on how to Install Homebrew natively on Mac M1.

Once you have installed Homebrew on your Mac M1 computer, then follow the steps to install Node Js.

  1. First of all, open the Terminal, and make sure the Terminal is not running under Rosetta.
  2. Type the command “brew install node” and then hit the enter button to execute the command.
  3. If Node Js installed successfully on your Mac, then congratulation.

With the Node Js, Npm (node package manager) and Npx will be installed as well. With the help of Npm, you will be able to install Node Js packages.

If you want to run Node Js under Rosetta emulation, you can do so. To install Node Js on Mac under rosetta, follow the steps below.

Install Node Js under Rosetta

To build the Node Js source code into intel x86 executable binary, you will also need to install the Homebrew Intel version. Once the Homebrew Intel version is installed on your Mac, then follow the steps.

  1. Open the Terminal, and make sure the Terminal is running under Rosetta.
  2. Type the command “brew install node” and then hit the enter button to execute the command.
  3. Once you execute the command, Node Js will be installed on your computer.

I hope the this guide is helpful for you. If you have any questions, feel free to comment below.

Leave your reply here

Scroll to Top