Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPM ERRO INSTALL BETTER-SQLITE3 #20678

Closed
021Bedy opened this issue Jun 26, 2024 · 2 comments
Closed

NPM ERRO INSTALL BETTER-SQLITE3 #20678

021Bedy opened this issue Jun 26, 2024 · 2 comments

Comments

@021Bedy
Copy link

021Bedy commented Jun 26, 2024

erro:

> [email protected] install
> prebuild-install || node-gyp rebuild --release

prebuild-install warn install No prebuilt binaries found (target=22.3.0 runtime=node arch=arm64 libc= platform=android)
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | android | arm64
gyp info find Python using Python version 3.11.9 found at "/data/data/com.termux/files/usr/bin/python3"

gyp info spawn /data/data/com.termux/files/usr/bin/python3
gyp info spawn args [
gyp info spawn args '/data/data/com.termux/files/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/data/data/com.termux/files/home/cyans/Cyans_V3/node_modules/better-sqlite3/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/data/data/com.termux/files/usr/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/data/data/com.termux/files/home/.cache/node-gyp/22.3.0/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/data/data/com.termux/files/home/.cache/node-gyp/22.3.0',
gyp info spawn args '-Dnode_gyp_dir=/data/data/com.termux/files/usr/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/data/data/com.termux/files/home/.cache/node-gyp/22.3.0/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/data/data/com.termux/files/home/cyans/Cyans_V3/node_modules/better-sqlite3',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.'
gyp info spawn args ]
gyp: Undefined variable android_ndk_path in binding.gyp while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.<anonymous> (/data/data/com.termux/files/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:297:18)
gyp ERR! stack at ChildProcess.emit (node:events:520:28)
gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:294:12)
gyp ERR! System Linux 4.19.157-perf+
gyp ERR! command "/data/data/com.termux/files/usr/bin/node" "/data/data/com.termux/files/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release"
gyp ERR! cwd /data/data/com.termux/files/home/cyans/Cyans_V3/node_modules/better-sqlite3
gyp ERR! node -v v22.3.0
gyp ERR! node-gyp -v v10.1.0
gyp ERR! not ok
npm error code 1
npm error path /data/data/com.termux/files/home/cyans/Cyans_V3/node_modules/better-sqlite3
npm error command failed
npm error command sh -c prebuild-install || node-gyp rebuild --release
npm error A complete log of this run can be found in: /data/data/com.termux/files/home/.npm/_logs/2024-06-26T06_46_56_286Z-debug-0.log
@tqfx
Copy link
Contributor

tqfx commented Jun 26, 2024

Workaround 1

export GYP_DEFINES="android_ndk_path=''"

Ref: #20717

Workaround 2

mkdir ~/.gyp && echo "{'variables':{'android_ndk_path':''}}" > ~/.gyp/include.gypi

Ref: #19522 (comment)

@021Bedy
Copy link
Author

021Bedy commented Jun 26, 2024

Thanks, workaround 1 worked.

export GYP_DEFINES="android_ndk_path=''"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants