better-sqlite3: binding.gyp not found in /root/bots/helper
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 10.7k
- Forks
- 1.9k
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 5
Description
Please look thru your error log for the string gyp info using node-gyp@ and if the version number is less than the current release of node-gyp then please upgrade using the instructions at https://github.com/nodejs/node-gyp/blob/main/docs/Updating-npm-bundled-node-gyp.md and try your command again.
Requests for help with node-sass are very common. Please be aware that this package is deprecated, you should seek alternatives and avoid opening new issues about it here.
- Node Version: Node: v21.2.0 | NPM: 10.2.3
- Platform: Linux local 5.2.0 #1 SMP Thu Dec 15 20:31:06 MSK 2022 x86_64 x86_64 x86_64 GNU/Linux (Ubuntu 22.04.3)
- Compiler: gcc version 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04)
- Module: better-sqlite3
Verbose output (from npm or node-gyp):
npm verbose
npm verb cli /root/.nvm/versions/node/v21.2.0/bin/node /root/.nvm/versions/node/v21.2.0/bin/npm
npm info using npm@10.2.3
npm info using node@v21.2.0
npm verb title npm
npm verb argv "--loglevel" "verbose"
npm verb logfile logs-max:10 dir:/root/.npm/_logs/2023-11-21T03_58_18_590Z-
npm verb logfile /root/.npm/_logs/2023-11-21T03_58_18_590Z-debug-0.log
gyp verbose
gyp info it worked if it ends with ok
gyp verb cli [
gyp verb cli '/root/.nvm/versions/node/v21.2.0/bin/node',
gyp verb cli '/root/.nvm/versions/node/v21.2.0/bin/node-gyp',
gyp verb cli 'rebuild',
gyp verb cli '--verbose'
gyp verb cli ]
gyp info using node-gyp@10.0.1
gyp info using node@21.2.0 | linux | x64
gyp verb clean removing "build" directory
gyp verb find Python Python is not set from command line or npm configuration
gyp verb find Python Python is not set from environment variable PYTHON
gyp verb find Python checking if "python3" can be used
gyp verb find Python - executing "python3" to get executable path
gyp verb find Python - executable path is "/usr/bin/python3"
gyp verb find Python - executing "/usr/bin/python3" to get version
gyp verb find Python - version is "3.10.12"
gyp info find Python using Python version 3.10.12 found at "/usr/bin/python3"
gyp verb get node dir no --target version specified, falling back to host node version: 21.2.0
gyp verb install input version string "21.2.0"
gyp verb install installing version: 21.2.0
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version is already installed, need to check "installVersion"
gyp verb got "installVersion" 11
gyp verb needs "installVersion" 11
gyp verb install version is good
gyp verb get node dir target node version installed: 21.2.0
gyp verb build dir attempting to create "build" dir: /root/bots/helper/build
gyp verb build dir "build" dir needed to be created? Yes
gyp verb build/config.gypi creating config file
gyp verb build/config.gypi writing out config file: /root/bots/helper/build/config.gypi
gyp verb config.gypi checking for gypi file: /root/bots/helper/config.gypi
gyp verb common.gypi checking for gypi file: /root/bots/helper/common.gypi
gyp verb gyp gyp format was not specified; forcing "make"
gyp info spawn /usr/bin/python3
gyp info spawn args [
gyp info spawn args '/root/.nvm/versions/node/v21.2.0/lib/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 '/root/bots/helper/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/root/.nvm/versions/node/v21.2.0/lib/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/root/.cache/node-gyp/21.2.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=/root/.cache/node-gyp/21.2.0',
gyp info spawn args '-Dnode_gyp_dir=/root/.nvm/versions/node/v21.2.0/lib/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/root/.cache/node-gyp/21.2.0/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/root/bots/helper',
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: binding.gyp not found (cwd: /root/bots/helper) 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> (/root/.nvm/versions/node/v21.2.0/lib/node_modules/node-gyp/lib/configure.js:271:18)
gyp ERR! stack at ChildProcess.emit (node:events:519:28)
gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:294:12)
gyp ERR! System Linux 5.2.0
gyp ERR! command "/root/.nvm/versions/node/v21.2.0/bin/node" "/root/.nvm/versions/node/v21.2.0/bin/node-gyp" "rebuild" "--verbose"
gyp ERR! cwd /root/bots/helper
gyp ERR! node -v v21.2.0
gyp ERR! node-gyp -v v10.0.1
gyp ERR! not ok
terminal output
yarn install v1.22.21
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
error /root/bots/helper/node_modules/better-sqlite3: Command failed.
Exit code: 1
Command: prebuild-install || npm run build-release
Arguments:
Directory: /root/bots/helper/node_modules/better-sqlite3
Output:
prebuild-install warn install No prebuilt binaries found (target=21.2.0 runtime=node arch=x64 libc= platform=linux)
> better-sqlite3@7.6.2 build-release
> node-gyp rebuild --release
gyp info it worked if it ends with ok
gyp info using node-gyp@10.0.1
gyp info using node@21.2.0 | linux | x64
gyp info find Python using Python version 3.10.12 found at "/usr/bin/python3"
gyp info spawn /usr/bin/python3
gyp info spawn args [
gyp info spawn args '/root/.nvm/versions/node/v21.2.0/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 '/root/bots/helper/node_modules/better-sqlite3/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/root/.nvm/versions/node/v21.2.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/root/.cache/node-gyp/21.2.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=/root/.cache/node-gyp/21.2.0',
gyp info spawn args '-Dnode_gyp_dir=/root/.nvm/versions/node/v21.2.0/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/root/.cache/node-gyp/21.2.0/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/root/bots/helper/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 info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory '/root/bots/helper/node_modules/better-sqlite3/build'
TOUCH ba23eeee118cd63e16015df367567cb043fed872.intermediate
ACTION deps_sqlite3_gyp_locate_sqlite3_target_copy_builtin_sqlite3 ba23eeee118cd63e16015df367567cb043fed872.intermediate
TOUCH Release/obj.target/deps/locate_sqlite3.stamp
CC(target) Release/obj.target/sqlite3/gen/sqlite3/sqlite3.o
rm -f Release/obj.target/deps/sqlite3.a Release/obj.target/deps/sqlite3.a.ar-file-list; mkdir -p `dirname Release/obj.target/deps/sqlite3.a`
ar crs Release/obj.target/deps/sqlite3.a @Release/obj.target/deps/sqlite3.a.ar-file-list
COPY Release/sqlite3.a
CXX(target) Release/obj.target/better_sqlite3/src/better_sqlite3.o
In file included from ./src/better_sqlite3.lzz:11,
from ../src/better_sqlite3.cpp:4:
/root/.cache/node-gyp/21.2.0/include/node/node.h:1192:7: warning: cast between incompatible function types from 'void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, v8::Local<v8::Context>)' to 'node::addon_context_register_func' {aka 'void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, v8::Local<v8::Context>, void*)'} [-Wcast-function-type]
1192 | (node::addon_context_register_func) (regfunc), \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/.cache/node-gyp/21.2.0/include/node/node.h:1210:3: note: in expansion of macro 'NODE_MODULE_CONTEXT_AWARE_X'
1210 | NODE_MODULE_CONTEXT_AWARE_X(modname, regfunc, NULL, 0)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/.cache/node-gyp/21.2.0/include/node/node.h:1241:3: note: in expansion of macro 'NODE_MODULE_CONTEXT_AWARE'
1241 | NODE_MODULE_CONTEXT_AWARE(NODE_GYP_MODULE_NAME, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~
./src/better_sqlite3.lzz:67:1: note: in expansion of macro 'NODE_MODULE_INIT'
./src/util/macros.lzz: In function 'void SetPrototypeGetter(v8::Isolate*, v8::Local<v8::External>, v8::Local<v8::FunctionTemplate>, const char*, v8::AccessorGetterCallback)':
./src/util/macros.lzz:157:21: error: 'v8::AccessorSignature' has not been declared
./src/util/binder.lzz: In static member function 'static bool Binder::IsPlainObject(v8::Isolate*, v8::Local<v8::Object>)':
./src/util/binder.lzz:37:51: error: 'class v8::Object' has no member named 'CreationContext'; did you mean 'GetCreationContext'?
./src/util/data.lzz: In function 'v8::Local<v8::Value> Data::GetValueJS(v8::Isolate*, sqlite3_stmt*, int, bool)':
./src/util/data.lzz:73:92: warning: this statement may fall through [-Wimplicit-fallthrough=]
./src/util/data.lzz:73:197: note: here
./src/util/data.lzz: In function 'v8::Local<v8::Value> Data::GetValueJS(v8::Isolate*, sqlite3_value*, bool)':
./src/util/data.lzz:77:81: warning: this statement may fall through [-Wimplicit-fallthrough=]
./src/util/data.lzz:77:175: note: here
make: *** [better_sqlite3.target.mk:125: Release/obj.target/better_sqlite3/src/better_sqlite3.o] Error 1
rm ba23eeee118cd63e16015df367567cb043fed872.intermediate
make: Leaving directory '/root/bots/helper/node_modules/better-sqlite3/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.<anonymous> (/root/.nvm/versions/node/v21.2.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:209:23)
gyp ERR! System Linux 5.2.0
gyp ERR! command "/root/.nvm/versions/node/v21.2.0/bin/node" "/root/.nvm/versions/node/v21.2.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release"
gyp ERR! cwd /root/bots/helper/node_modules/better-sqlite3
gyp ERR! node -v v21.2.0
gyp ERR! node-gyp -v v10.0.1
gyp ERR! not ok
debug log
0 verbose cli /root/.nvm/versions/node/v21.2.0/bin/node /root/.nvm/versions/node/v21.2.0/bin/npm
1 info using npm@10.2.3
2 info using node@v21.2.0
3 timing npm:load:whichnode Completed in 2ms
4 timing config:load:defaults Completed in 2ms
5 timing config:load:file:/root/.nvm/versions/node/v21.2.0/lib/node_modules/npm/npmrc Completed in 1ms
6 timing config:load:builtin Completed in 2ms
7 timing config:load:cli Completed in 3ms
8 timing config:load:env Completed in 1ms
9 timing config:load:file:/root/bots/helper/node_modules/better-sqlite3/.npmrc Completed in 0ms
10 timing config:load:project Completed in 7ms
11 timing config:load:file:/root/.npmrc Completed in 0ms
12 timing config:load:user Completed in 0ms
13 timing config:load:file:/root/.nvm/versions/node/v21.2.0/etc/npmrc Completed in 0ms
14 timing config:load:global Completed in 0ms
15 timing config:load:setEnvs Completed in 1ms
16 timing config:load Completed in 16ms
17 timing npm:load:configload Completed in 16ms
18 timing config:load:flatten Completed in 4ms
19 timing npm:load:mkdirpcache Completed in 0ms
20 timing npm:load:mkdirplogs Completed in 0ms
21 verbose title npm run build-release
22 verbose argv "run" "build-release"
23 timing npm:load:setTitle Completed in 1ms
24 timing npm:load:display Completed in 1ms
25 verbose logfile logs-max:10 dir:/root/.npm/_logs/2023-11-21T04_02_50_651Z-
26 verbose logfile /root/.npm/_logs/2023-11-21T04_02_50_651Z-debug-0.log
27 timing npm:load:logFile Completed in 12ms
28 timing npm:load:timers Completed in 0ms
29 timing npm:load:configScope Completed in 1ms
30 timing npm:load Completed in 55ms
31 silly logfile done cleaning log files
32 timing command:run Completed in 82253ms
33 verbose exit 1
34 timing npm Completed in 82361ms
35 verbose code 1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The report names no node-gyp source file or test; the failing build is under node_modules/better-sqlite3. Start by separating the top-level binding.gyp error from the later V8 compilation errors and reproduce with Node v21.2.0, node-gyp 10.0.1, and better-sqlite3 7.6.2. Done would require a confirmed node-gyp-specific failure and a named reproduction or test; otherwise move the report to better-sqlite3.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nodejs, python, sqlite
- Domain
- build-system, devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 15/100