NodeJS on Apple Silicon M1 [closed]

孤人 提交于 2021-02-20 05:36:54

问题


I am trying to install NodeJS on the new Apple Silicon MacBook Pro, but I wasn't able to find a installer for ARM Macs.

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.

Is it already possible to install Node.JS on a ARM Mac without having it run in emulation mode?


回答1:


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:

  • Node.JS Technical Steering Committee opened Issue #886 in their GitHub repository to track Node's support for Apple Silicon.



回答2:


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"



来源:https://stackoverflow.com/questions/64899827/nodejs-on-apple-silicon-m1

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!