Open ghost opened 1 year ago
I said it successfuly built, but in the case I meant without being built for android.
Here's what i did to get it to build for android at least.
This is probably similar to what prebuild-for-nodjs-mobile does (at least in the android case)
#!/bin/sh
export ANDROID_NDK_PATH=/home/user/opt/android/ndk/25.2.9519653
# probably not needed
export PATH=$PATH:/usr/sbin:$ANDROID_NDK_PATH/toolchains/llvm/prebuilt/linux-x86_64/bin/
toolchain_target_arch=aarch64
node_target_arch=arm64
android_api_level=22
export CC=$ANDROID_NDK_PATH/toolchains/llvm/prebuilt/linux-x86_64/bin/${toolchain_target_arch}-linux-android${android_api_level}-clang
export CXX=$ANDROID_NDK_PATH/toolchains/llvm/prebuilt/linux-x86_64/bin/${toolchain_target_arch}-linux-android${android_api_level}-clang++
export LINK=$ANDROID_NDK_PATH/toolchains/llvm/prebuilt/linux-x86_64/bin/${toolchain_target_arch}-linux-android${android_api_level}-clang++
export AR=$ANDROID_NDK_PATH/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar
export npm_config_nodedir=/path/to/projectwithlibnode/node_modules/capacitor-nodejs/android/libnode
export npm_config_arch=${node_target_arch}
export node_config_plaform=android
# maybe this isn't required?
export node_config_format=make-android
./node_modules/.bin/node-pre-gyp -v rebuild
https://github.com/kelektiv/node.bcrypt.js
This is probably due to
node-pre-gyp
It builds successfully outside of
prebuild-for-nodejs-mobile