-
-
Notifications
You must be signed in to change notification settings - Fork 431
Open
Description
I'm trying to install better-sqlite3 on my linux ubuntu machine, and it appears the build is failing on my machine. I suck at troubleshooting c problems, but will research it in a little bit...any insight would be helpful.
$ npm update better-sqlite3 --legacy-peer-deps
npm error code 1
npm error path /home/chris/vsCode/musicCards/node_modules/better-sqlite3
npm error command failed
npm error command sh -c prebuild-install || node-gyp rebuild --release
npm error make: Entering directory '/home/chris/vsCode/musicCards/node_modules/better-sqlite3/build'
npm error TOUCH ba23eeee118cd63e16015df367567cb043fed872.intermediate
npm error ACTION deps_sqlite3_gyp_locate_sqlite3_target_copy_builtin_sqlite3 ba23eeee118cd63e16015df367567cb043fed872.intermediate
npm error TOUCH Release/obj.target/deps/locate_sqlite3.stamp
npm error CC(target) Release/obj.target/sqlite3/gen/sqlite3/sqlite3.o
npm error 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`
npm error ar crs Release/obj.target/deps/sqlite3.a @Release/obj.target/deps/sqlite3.a.ar-file-list
npm error COPY Release/sqlite3.a
npm error CXX(target) Release/obj.target/better_sqlite3/src/better_sqlite3.o
npm error rm ba23eeee118cd63e16015df367567cb043fed872.intermediate
npm error make: Leaving directory '/home/chris/vsCode/musicCards/node_modules/better-sqlite3/build'
npm error prebuild-install warn install No prebuilt binaries found (target=22.17.1 runtime=node arch=x64 libc= platform=linux)
npm error gyp info it worked if it ends with ok
npm error gyp info using [email protected]
npm error gyp info using [email protected] | linux | x64
npm error gyp info find Python using Python version 3.12.3 found at "/usr/bin/python3"
npm error gyp info spawn /usr/bin/python3
npm error gyp info spawn args [
npm error gyp info spawn args '/home/chris/.nvm/versions/node/v22.17.1/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm error gyp info spawn args 'binding.gyp',
npm error gyp info spawn args '-f',
npm error gyp info spawn args 'make',
npm error gyp info spawn args '-I',
npm error gyp info spawn args '/home/chris/vsCode/musicCards/node_modules/better-sqlite3/build/config.gypi',
npm error gyp info spawn args '-I',
npm error gyp info spawn args '/home/chris/.nvm/versions/node/v22.17.1/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm error gyp info spawn args '-I',
npm error gyp info spawn args '/home/chris/.cache/node-gyp/22.17.1/include/node/common.gypi',
npm error gyp info spawn args '-Dlibrary=shared_library',
npm error gyp info spawn args '-Dvisibility=default',
npm error gyp info spawn args '-Dnode_root_dir=/home/chris/.cache/node-gyp/22.17.1',
npm error gyp info spawn args '-Dnode_gyp_dir=/home/chris/.nvm/versions/node/v22.17.1/lib/node_modules/npm/node_modules/node-gyp',
npm error gyp info spawn args '-Dnode_lib_file=/home/chris/.cache/node-gyp/22.17.1/<(target_arch)/node.lib',
npm error gyp info spawn args '-Dmodule_root_dir=/home/chris/vsCode/musicCards/node_modules/better-sqlite3',
npm error gyp info spawn args '-Dnode_engine=v8',
npm error gyp info spawn args '--depth=.',
npm error gyp info spawn args '--no-parallel',
npm error gyp info spawn args '--generator-output',
npm error gyp info spawn args 'build',
npm error gyp info spawn args '-Goutput_dir=.'
npm error gyp info spawn args ]
npm error gyp info spawn make
npm error gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm error In file included from ./src/better_sqlite3.lzz:11,
npm error from ../src/better_sqlite3.cpp:4:
npm error /home/chris/.cache/node-gyp/22.17.1/include/node/node.h:1248: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]
npm error 1248 | (node::addon_context_register_func) (regfunc), \
npm error | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm error /home/chris/.cache/node-gyp/22.17.1/include/node/node.h:1266:3: note: in expansion of macro ‘NODE_MODULE_CONTEXT_AWARE_X’
npm error 1266 | NODE_MODULE_CONTEXT_AWARE_X(modname, regfunc, NULL, 0)
npm error | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
npm error /home/chris/.cache/node-gyp/22.17.1/include/node/node.h:1297:3: note: in expansion of macro ‘NODE_MODULE_CONTEXT_AWARE’
npm error 1297 | NODE_MODULE_CONTEXT_AWARE(NODE_GYP_MODULE_NAME, \
npm error | ^~~~~~~~~~~~~~~~~~~~~~~~~
npm error ./src/better_sqlite3.lzz:67:1: note: in expansion of macro ‘NODE_MODULE_INIT’
npm error ./src/util/macros.lzz: In function ‘void SetPrototypeGetter(v8::Isolate*, v8::Local<v8::External>, v8::Local<v8::FunctionTemplate>, const char*, v8::AccessorGetterCallback)’:
npm error ./src/util/macros.lzz:150:46: error: no matching function for call to ‘v8::ObjectTemplate::SetAccessor(v8::Local<v8::String>, void (*&)(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>&), int, v8::Local<v8::External>&, v8::AccessControl, v8::PropertyAttribute)’
npm error In file included from /home/chris/.cache/node-gyp/22.17.1/include/node/v8-function.h:15,
npm error from /home/chris/.cache/node-gyp/22.17.1/include/node/v8.h:33,
npm error from /home/chris/.cache/node-gyp/22.17.1/include/node/node.h:74:
npm error /home/chris/.cache/node-gyp/22.17.1/include/node/v8-template.h:1055:8: note: candidate: ‘void v8::ObjectTemplate::SetAccessor(v8::Local<v8::Name>, v8::AccessorNameGetterCallback, v8::AccessorNameSetterCallback, v8::Local<v8::Value>, v8::PropertyAttribute, v8::SideEffectType, v8::SideEffectType)’
npm error 1055 | void SetAccessor(
npm error | ^~~~~~~~~~~
npm error /home/chris/.cache/node-gyp/22.17.1/include/node/v8-template.h:1058:61: note: no known conversion for argument 5 from ‘v8::AccessControl’ to ‘v8::PropertyAttribute’
npm error 1058 | Local<Value> data = Local<Value>(), PropertyAttribute attribute = None,
npm error | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
npm error /home/chris/.cache/node-gyp/22.17.1/include/node/v8-template.h:1049:8: note: candidate: ‘void v8::ObjectTemplate::SetAccessor(v8::Local<v8::String>, v8::AccessorGetterCallback, v8::AccessorSetterCallback, v8::Local<v8::Value>, v8::PropertyAttribute, v8::SideEffectType, v8::SideEffectType)’
npm error 1049 | void SetAccessor(
npm error | ^~~~~~~~~~~
npm error /home/chris/.cache/node-gyp/22.17.1/include/node/v8-template.h:1052:61: note: no known conversion for argument 5 from ‘v8::AccessControl’ to ‘v8::PropertyAttribute’
npm error 1052 | Local<Value> data = Local<Value>(), PropertyAttribute attribute = None,
npm error | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
npm error ./src/util/data.lzz: In function ‘v8::Local<v8::Value> Data::GetValueJS(v8::Isolate*, sqlite3_stmt*, int, bool)’:
npm error ./src/util/data.lzz:73:92: warning: this statement may fall through [-Wimplicit-fallthrough=]
npm error ./src/util/data.lzz:73:197: note: here
npm error ./src/util/data.lzz: In function ‘v8::Local<v8::Value> Data::GetValueJS(v8::Isolate*, sqlite3_value*, bool)’:
npm error ./src/util/data.lzz:77:81: warning: this statement may fall through [-Wimplicit-fallthrough=]
npm error ./src/util/data.lzz:77:175: note: here
npm error make: *** [better_sqlite3.target.mk:122: Release/obj.target/better_sqlite3/src/better_sqlite3.o] Error 1
npm error gyp ERR! build error
npm error gyp ERR! stack Error: `make` failed with exit code: 2
npm error gyp ERR! stack at ChildProcess.<anonymous> (/home/chris/.nvm/versions/node/v22.17.1/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:216:23)
npm error gyp ERR! System Linux 6.8.0-64-generic
npm error gyp ERR! command "/home/chris/.nvm/versions/node/v22.17.1/bin/node" "/home/chris/.nvm/versions/node/v22.17.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release"
npm error gyp ERR! cwd /home/chris/vsCode/musicCards/node_modules/better-sqlite3
npm error gyp ERR! node -v v22.17.1
npm error gyp ERR! node-gyp -v v11.0.0
npm error gyp ERR! not ok
npm error A complete log of this run can be found in: /home/chris/.npm/_logs/2025-07-29T22_45_52_046Z-debug-0.log
Metadata
Metadata
Assignees
Labels
No labels