43

I am trying to install NodeJS on the new Apple Silicon MacBook Pro, but I wasn't able to find a way to install it on the ARM-based Apple M1.

The standard installation will run in Intel emulation mode, but I saw they already have an ARM Linux version which I assume is not suitable for M1 Macs.

If possible, how can I install Node.JS on Apple Silicon without having it run in emulation mode?

3
  • This question is discussed on meta
    – BDL
    Nov 28, 2020 at 10:15
  • 1
    @Lucki: I reformulated your question such that it sounds less like a request for a off-site resource. If you don't like the edit, feel free to roll it back.
    – BDL
    Nov 28, 2020 at 10:19
  • 3
    This question and answer provide vital information for configuring the M1 Mac to run all versions of nodes. Mar 17, 2021 at 16:33

2 Answers 2

37

The primary Node.JS repository has Issue #2747, which was updated yesterday with a note that current versions of Node compile just fine with no modifications required via Rosetta 2. The same post indicated that there was still in-flight "work to be done" to compile Node to an M1-native binary to unlock additional performance benefits.


Additional resources:

1
  • Just to follow up on this, I used NVM to install an x86 by downloading the Intel version of Hyper.js and copying that to Applications as "Hyper Intel". I then ran nvm uninstall 12 (Arm version need to go) and nvm install 12 and it installed the x86 version. This now runs all node 12 apps under Rosetta allowing me to upgrade to a version that works in my own time.
    – pip
    Nov 12, 2021 at 11:20
30

Hit similar issues. I would recommend you enable "Open using Rosetta" on Terminal, which should reduce all ends of pain for the moment. When this was enabled, I was able to install Node, as well as Homebrew, etc, with no issues. To do to:

  1. right click your terminal app from Finder
  2. select "Get Info"
  3. enable "Open using Rosetta"

N.B. I am using iTerm in the screenshot below, but the same applies for Terminal

Enabling Open using Rosetta

4
  • 21
    FWIW: iTerm isn't Terminal.app.
    – esqew
    Nov 18, 2020 at 22:10
  • 7
    True, but many use it in place of Terminal and come to think of it that way because when someone says do something in Terminal, they go to iTerm.
    – Greg
    Nov 23, 2020 at 19:52
  • 3
    Solution didn't work for me, I get the same error regardless.
    – geoidesic
    Dec 19, 2021 at 15:52
  • Worked for me. I have a Macbook Air M1. I add issues installing node-sass which was part of my project dependencies. The above solution worked for me.
    – Ismail
    Aug 31, 2022 at 4:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.