node-native-build
Installation
SKILL.md
Node Native Build
Purpose
Tell apart a missing toolchain, a node-gyp configuration problem, and a package that simply ships no binary for Android, then apply the smallest fix.
When to use
npm install,yarn, orpnpmfails while compiling or fetching a native addon.gyp ERR!,Undefined variable android_ndk_path, orUnsupported platform: android.Cannot find module '@scope/pkg-android-arm64'or a similar optional dependency error.
When NOT to use
- Python packages:
python-native-build. - Failures in your own JavaScript.
pkgerrors before npm ran:package-troubleshooting.
Preconditions
Run sh scripts/check-node-toolchain.sh. Capture the first gyp ERR! or build error, the package and version, and whether process.platform reports android (it does on Termux Node).