Get architecture of NodeJS installation on Apple Silicon

1 min read

148 words

I had the privilege to get one of the new MacBook Pros with an M1 chip very early. Because of the new ARM architecture of the new processor I try to look if most of my tools and programs already run that architecture. Today I checked if my node version is already running on the ARM builds of NodeJS.

To quickly check this for yourself open up a terminal and enter node to open up the node repl. Inside enter process.arch this will return either x64 or arm64. As one can guess the latter shows that NodeJS already runs on the ARM version. x64 means that NodeJS still runs via Rosetta 2 emulation.

NodeJS started experimental support of native arm64 builds in version 15.3.0.

UPDATE: NodeJS has its prebuilt binaries starting with version 16. So one does not have to compile it oneself from the source.