node-sqlite3
node-sqlite3 copied to clipboard
npm_config_target_arch=arm64 install x64 on a x64 server
Issue Summary
when I run (on x64 server):
npm_config_target_platform=linux npm_config_target_arch=arm64 yarn add [email protected]
file node_modules/sqlite3/lib/binding/napi-v6-linux-musl-arm64/node_sqlite3.node
it returns:
node_modules/sqlite3/lib/binding/napi-v6-linux-musl-arm64/node_sqlite3.node: ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV), dynamically linked, with debug_info, not stripped
when doing the same with v5.1.7:
npm_config_target_platform=linux npm_config_target_arch=arm64 yarn add [email protected]
file node_modules/sqlite3/build/Release/node_sqlite3.node
it returns:
node_modules/sqlite3/build/Release/node_sqlite3.node: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, with debug_info, not stripped
so v5.1.7 installs the x64 binary even if I say I want the arm64 binary
Relevant logs or output
see above
Version
v5.1.7
Node.js Version
v21.5.0
How did you install the library?
npm_config_target_platform=linux npm_config_target_arch=arm64 yarn add sqlite3@version
It seems we had the same issue with 5.1.7 - in our case it was with an Electron app and apparently it resulted in an x64 version being built instead of arm64. Reverting to 5.1.6 fixed the issue: https://github.com/laurent22/joplin/issues/9922
That's not great anyway to have such major bug in a patch release. Are the developers even aware of the issue?
npm uninstall sqlite3 --force
npm install [email protected] --build-from-source --target_arch=arm64 --fallback-to-build --force
Reverting to 5.1.6 fixed