node-pre-gyp doesn't handle arm architectures properly.
See original GitHub issueThe “arm” target in itself isn’t enough. If you look at node binary distributions, you have 3 variants for arm: armv6l, armv7l, and arm64.
An example of an armv6l platform is a raspberry pi zero. Installing nodejs on a raspberry pi zero through nvm will yield the correct download of the correct binary (armv6l).
An example of an armv7l platform is a raspberry pi 3. Installing nodejs on a raspberry pi 3 through nvm will also yield the correct download of the correct binary (armv7l).
However, for both platforms, node-pre-gyp identify them as “arm”, meaning we can only cross compile and publish a single version of node-pre-gyp packages, either armv6l or armv7l, which aren’t interchangeable due to dynamic library versions and tags.
This creates a problem where users will be able to download the wrong version of the package for their platform, and crash on load. The only method for them to fix it is to uninstall the node-pre-gyp enabled package, and re-install it using a flag to force falling back on ignoring published packages and compile from source instead, which is not obvious.
Also, the documentation states that the only correct values for --target_arch are ia32, x64 and arm, whereas arm64 is in fact a valid keyword to use here. The produced packages work properly on an arm64 environment.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:13
- Comments:14 (9 by maintainers)

Top Related StackOverflow Question
Unfortunately I just ran into this when reworking
node-sqlite3’s prebuilt binaries 😕 It’d be great to fixarmv6andarmv7in node-pre-gyp but I’ll have to keep them disabled for now@inukshuk thanks. If
process.archisarm64on silicon macbooks then I don’t see a problem here with node-pre-gyp because the existing versioning information is suitable for macbooks. So the problem is that the module that integrates node-pre-gyp needs to properly createarm64binaries, detect them, and require them at runtime. The error you are seeing:Indicates that the sqlite3 module is incorrectly packaging its binary. So this is a problem with node-sqlite3 then not node-pre-gyp.