Skip to content

Guides

Fixing Node native modules on arm64

npm install fails or compiles from source on arm64 runners.

5 min read

npm install fails or compiles from source on arm64 runners.

Why it happens

The package has no prebuilt aarch64 binary, so node-gyp builds it locally.

How to fix it

  1. Check whether a newer version ships aarch64 prebuilds
  2. Cache the node-gyp build output so the compile happens once
  3. Install build-essential and python3 so the fallback compile can succeed

Your next build could be twice as fast, at half the price

Start free. Migrating away is the same one line, and we publish that diff too.