[Bug]: Cannot build better-sqlite3@9.6.0 on macOS/Arch Linux #1650

Closed
opened 2026-02-28 19:49:39 -06:00 by GiteaMirror · 7 comments
Owner

Originally created by @akgerber on GitHub (Dec 9, 2024).

Verified issue does not already exist?

  • I have searched and found no existing issue
  • I will be providing steps how to reproduce the bug (in most cases this will also mean uploading a demo budget file)

What happened?

I have been unable to build the better-sqlite3@npm:9.6.0 dependency as required by yarn install, I believe since I upgraded to MacOS Sequoia.

The initial problem (a missing climits file) I had was resolved by reinstalling developer tools, but this revealed a new problem:
yarn install log, truncated to the issue:

➤ YN0007: │ better-sqlite3@npm:9.6.0 must be built because it never has been before or the last one failed
➤ YN0009: │ better-sqlite3@npm:9.6.0 couldn't be built successfully (exit code 1, logs can be found here: /private/var/folders/1g/qjgtwn9967j9t7fltdr29vbr0000gp/T/xfs-c2f6d1ae/build.log)
➤ YN0000: └ Completed in 13s 163ms
➤ YN0000: · Failed with errors in 13s 543ms

The contents of /private/var/folders/1g/qjgtwn9967j9t7fltdr29vbr0000gp/T/xfs-c2f6d1ae/build.log

# This file contains the result of Yarn building a package (better-sqlite3@npm:9.6.0)
# Script name: install

prebuild-install warn install No prebuilt binaries found (target=23.3.0 runtime=node arch=arm64 libc= platform=darwin)
gyp info it worked if it ends with ok
gyp info using node-gyp@10.1.0
gyp info using node@23.3.0 | darwin | arm64
gyp info find Python using Python version 3.13.0 found at "/opt/homebrew/opt/python@3.13/bin/python3.13"

gyp info spawn /opt/homebrew/opt/python@3.13/bin/python3.13
gyp info spawn args [
gyp info spawn args '/Users/akgerber/Code/github/actual-server/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 '/Users/akgerber/Code/github/actual-server/node_modules/better-sqlite3/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/akgerber/Code/github/actual-server/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/akgerber/Library/Caches/node-gyp/23.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=/Users/akgerber/Library/Caches/node-gyp/23.3.0',
gyp info spawn args '-Dnode_gyp_dir=/Users/akgerber/Code/github/actual-server/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/Users/akgerber/Library/Caches/node-gyp/23.3.0/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/Users/akgerber/Code/github/actual-server/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' ]
  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
  LIBTOOL-STATIC Release/sqlite3.a
  CXX(target) Release/obj.target/better_sqlite3/src/better_sqlite3.o
In file included from ../src/better_sqlite3.cpp:4:
In file included from ./src/better_sqlite3.lzz:11:
In file included from /Users/akgerber/Library/Caches/node-gyp/23.3.0/include/node/node.h:73:
In file included from /Users/akgerber/Library/Caches/node-gyp/23.3.0/include/node/v8.h:23:
In file included from /Users/akgerber/Library/Caches/node-gyp/23.3.0/include/node/cppgc/common.h:8:
/Users/akgerber/Library/Caches/node-gyp/23.3.0/include/node/v8config.h:13:2: error: "C++20 or later required."
   13 | #error "C++20 or later required."
      |  ^
In file included from ../src/better_sqlite3.cpp:4:
./src/util/macros.lzz:31:69: error: no template named 'CopyablePersistentTraits' in namespace 'v8'; did you mean 'NonCopyablePersistentTraits'?
   31 | template <class T> using CopyablePersistent = v8::Persistent<T, v8::CopyablePersistentTraits<T>>;
      |                                                                 ~~~~^~~~~~~~~~~~~~~~~~~~~~~~
      |                                                                     NonCopyablePersistentTraits
/Users/akgerber/Library/Caches/node-gyp/23.3.0/include/node/v8-persistent-handle.h:223:7: note: 'NonCopyablePersistentTraits' declared here
  223 | class NonCopyablePersistentTraits {
      |       ^
In file included from ../src/better_sqlite3.cpp:4:
./src/util/macros.lzz:149:6: error: no type named 'AccessorGetterCallback' in namespace 'v8'; did you mean 'AccessorNameGetterCallback'?
  149 |         v8::AccessorGetterCallback func
      |         ~~~~^~~~~~~~~~~~~~~~~~~~~~
      |             AccessorNameGetterCallback
/Users/akgerber/Library/Caches/node-gyp/23.3.0/include/node/v8-object.h:155:7: note: 'AccessorNameGetterCallback' declared here
  155 | using AccessorNameGetterCallback =
      |       ^
./src/util/macros.lzz:158:6: error: no type named 'AccessorGetterCallback' in namespace 'v8'; did you mean 'AccessorNameGetterCallback'?
  158 |         v8::AccessorGetterCallback func
      |         ~~~~^~~~~~~~~~~~~~~~~~~~~~
      |             AccessorNameGetterCallback
/Users/akgerber/Library/Caches/node-gyp/23.3.0/include/node/v8-object.h:155:7: note: 'AccessorNameGetterCallback' declared here
  155 | using AccessorNameGetterCallback =
      |       ^
./src/util/macros.lzz:172:28: error: no member named 'SetAccessor' in 'v8::ObjectTemplate'
  172 |         recv->InstanceTemplate()->SetAccessor(
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~^
./src/objects/database.lzz:17:17: error: no matching function for call to 'SetPrototypeGetter'
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~^
./src/objects/database.lzz:17:17: error: no matching function for call to 'SetPrototypeGetter'
   17 |                 SetPrototypeGetter(isolate, data, t, "open", JS_open);
      |                 ^~~~~~~~~~~~~~~~~~
./src/util/macros.lzz:153:6: note: candidate function not viable: no known conversion from 'void (v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value> &)' to 'v8::AccessorNameGetterCallback' (aka 'void (*)(Local<Name>, const PropertyCallbackInfo<Value> &)') for 5th argument
  153 | void SetPrototypeGetter(
      |      ^
  154 |         v8::Isolate* isolate,
  155 |         v8::Local<v8::External> data,
  156 |         v8::Local<v8::FunctionTemplate> recv,
  157 |         const char* name,
  158 |         v8::AccessorGetterCallback func
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./src/objects/database.lzz:18:17: error: no matching function for call to 'SetPrototypeGetter'
   18 |                 SetPrototypeGetter(isolate, data, t, "inTransaction", JS_inTransaction);
      |                 ^~~~~~~~~~~~~~~~~~
./src/util/macros.lzz:153:6: note: candidate function not viable: no known conversion from 'void (v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value> &)' to 'v8::AccessorNameGetterCallback' (aka 'void (*)(Local<Name>, const PropertyCallbackInfo<Value> &)') for 5th argument
  153 | void SetPrototypeGetter(
      |      ^
  154 |         v8::Isolate* isolate,
  155 |         v8::Local<v8::External> data,
  156 |         v8::Local<v8::FunctionTemplate> recv,
  157 |         const char* name,
  158 |         v8::AccessorGetterCallback func
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./src/objects/database.lzz:180:21: warning: variable 'status' set but not used [-Wunused-but-set-variable]
  180 |                 int status = sqlite3_db_config(db_handle, SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION, 1, NULL);
      |                     ^
./src/objects/statement.lzz:16:17: error: no matching function for call to 'SetPrototypeGetter'
   16 |                 SetPrototypeGetter(isolate, data, t, "busy", JS_busy);
      |                 ^~~~~~~~~~~~~~~~~~
./src/util/macros.lzz:153:6: note: candidate function not viable: no known conversion from 'void (v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value> &)' to 'v8::AccessorNameGetterCallback' (aka 'void (*)(Local<Name>, const PropertyCallbackInfo<Value> &)') for 5th argument
  153 | void SetPrototypeGetter(
      |      ^
  154 |         v8::Isolate* isolate,
  155 |         v8::Local<v8::External> data,
  156 |         v8::Local<v8::FunctionTemplate> recv,
  157 |         const char* name,
  158 |         v8::AccessorGetterCallback func
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./src/util/custom-table.lzz:45:9: warning: missing field 'xIntegrity' initializer [-Wmissing-field-initializers]
   45 |         };
      |         ^
./src/util/custom-table.lzz:72:9: warning: missing field 'xIntegrity' initializer [-Wmissing-field-initializers]
   72 |         };
      |         ^
3 warnings and 8 errors generated.
make: *** [Release/obj.target/better_sqlite3/src/better_sqlite3.o] Error 1
rm ba23eeee118cd63e16015df367567cb043fed872.intermediate
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.<anonymous> (/Users/akgerber/Code/github/actual-server/node_modules/node-gyp/lib/build.js:209:23)
gyp ERR! System Darwin 24.1.0
gyp ERR! command "/opt/homebrew/Cellar/node/23.3.0/bin/node" "/Users/akgerber/Code/github/actual-server/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release"
gyp ERR! cwd /Users/akgerber/Code/github/actual-server/node_modules/better-sqlite3
gyp ERR! node -v v23.3.0
gyp ERR! node-gyp -v v10.1.0
gyp ERR! not ok

Some cursory Googling indicates that this may be related to recent distributions of C++ removing a long-deprecated function signature:
https://github.com/WiseLibs/better-sqlite3/issues/1225

I was able to resolve the issue locally by bumping the dependency to latest version:

➜  actual-server git:(master) ✗ yarn add better-sqlite3
➤ YN0000: · Yarn 4.3.1
➤ YN0000: ┌ Resolution step
➤ YN0085: │ + better-sqlite3@npm:11.7.0
➤ YN0085: │ - better-sqlite3@npm:9.6.0
➤ YN0000: └ Completed
➤ YN0000: ┌ Post-resolution validation
➤ YN0002: │ actual-sync@workspace:. doesn't provide @babel/core (p89c81), requested by @babel/preset-typescript.
➤ YN0086: │ Some peer dependencies are incorrectly met by your project; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code.
➤ YN0086: │ Some peer dependencies are incorrectly met by dependencies; run yarn explain peer-requirements for details.
➤ YN0000: └ Completed
➤ YN0000: ┌ Fetch step
➤ YN0013: │ A package was added to the project (+ 9.64 MiB).
➤ YN0000: └ Completed in 0s 490ms
➤ YN0000: ┌ Link step
➤ YN0007: │ better-sqlite3@npm:11.7.0 must be built because it never has been before or the last one failed
➤ YN0000: └ Completed in 1s 326ms
➤ YN0000: · Done with warnings in 1s 959ms
➜  actual-server git:(master) ✗ yarn install
➤ YN0000: · Yarn 4.3.1
➤ YN0000: ┌ Resolution step
➤ YN0000: └ Completed
➤ YN0000: ┌ Post-resolution validation
➤ YN0002: │ actual-sync@workspace:. doesn't provide @babel/core (p89c81), requested by @babel/preset-typescript.
➤ YN0086: │ Some peer dependencies are incorrectly met by your project; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code.
➤ YN0086: │ Some peer dependencies are incorrectly met by dependencies; run yarn explain peer-requirements for details.
➤ YN0000: └ Completed
➤ YN0000: ┌ Fetch step
➤ YN0000: └ Completed in 0s 249ms
➤ YN0000: ┌ Link step
➤ YN0000: └ Completed
➤ YN0000: · Done with warnings in 0s 469ms

actual-server seems to run without issue on this newer version.

Where are you hosting Actual?

Locally via Yarn

What browsers are you seeing the problem on?

Other

Operating System

Mac OSX

Originally created by @akgerber on GitHub (Dec 9, 2024). ### Verified issue does not already exist? - [X] I have searched and found no existing issue - [X] I will be providing steps how to reproduce the bug (in most cases this will also mean uploading a demo budget file) ### What happened? I have been unable to build the `better-sqlite3@npm:9.6.0` dependency as required by `yarn install`, I believe since I upgraded to MacOS Sequoia. The initial problem (a missing `climits` file) I had was resolved by reinstalling developer tools, but this revealed a new problem: `yarn install` log, truncated to the issue: ``` ➤ YN0007: │ better-sqlite3@npm:9.6.0 must be built because it never has been before or the last one failed ➤ YN0009: │ better-sqlite3@npm:9.6.0 couldn't be built successfully (exit code 1, logs can be found here: /private/var/folders/1g/qjgtwn9967j9t7fltdr29vbr0000gp/T/xfs-c2f6d1ae/build.log) ➤ YN0000: └ Completed in 13s 163ms ➤ YN0000: · Failed with errors in 13s 543ms ``` The contents of `/private/var/folders/1g/qjgtwn9967j9t7fltdr29vbr0000gp/T/xfs-c2f6d1ae/build.log` ``` # This file contains the result of Yarn building a package (better-sqlite3@npm:9.6.0) # Script name: install prebuild-install warn install No prebuilt binaries found (target=23.3.0 runtime=node arch=arm64 libc= platform=darwin) gyp info it worked if it ends with ok gyp info using node-gyp@10.1.0 gyp info using node@23.3.0 | darwin | arm64 gyp info find Python using Python version 3.13.0 found at "/opt/homebrew/opt/python@3.13/bin/python3.13" gyp info spawn /opt/homebrew/opt/python@3.13/bin/python3.13 gyp info spawn args [ gyp info spawn args '/Users/akgerber/Code/github/actual-server/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 '/Users/akgerber/Code/github/actual-server/node_modules/better-sqlite3/build/config.gypi', gyp info spawn args '-I', gyp info spawn args '/Users/akgerber/Code/github/actual-server/node_modules/node-gyp/addon.gypi', gyp info spawn args '-I', gyp info spawn args '/Users/akgerber/Library/Caches/node-gyp/23.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=/Users/akgerber/Library/Caches/node-gyp/23.3.0', gyp info spawn args '-Dnode_gyp_dir=/Users/akgerber/Code/github/actual-server/node_modules/node-gyp', gyp info spawn args '-Dnode_lib_file=/Users/akgerber/Library/Caches/node-gyp/23.3.0/<(target_arch)/node.lib', gyp info spawn args '-Dmodule_root_dir=/Users/akgerber/Code/github/actual-server/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' ] 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 LIBTOOL-STATIC Release/sqlite3.a CXX(target) Release/obj.target/better_sqlite3/src/better_sqlite3.o In file included from ../src/better_sqlite3.cpp:4: In file included from ./src/better_sqlite3.lzz:11: In file included from /Users/akgerber/Library/Caches/node-gyp/23.3.0/include/node/node.h:73: In file included from /Users/akgerber/Library/Caches/node-gyp/23.3.0/include/node/v8.h:23: In file included from /Users/akgerber/Library/Caches/node-gyp/23.3.0/include/node/cppgc/common.h:8: /Users/akgerber/Library/Caches/node-gyp/23.3.0/include/node/v8config.h:13:2: error: "C++20 or later required." 13 | #error "C++20 or later required." | ^ In file included from ../src/better_sqlite3.cpp:4: ./src/util/macros.lzz:31:69: error: no template named 'CopyablePersistentTraits' in namespace 'v8'; did you mean 'NonCopyablePersistentTraits'? 31 | template <class T> using CopyablePersistent = v8::Persistent<T, v8::CopyablePersistentTraits<T>>; | ~~~~^~~~~~~~~~~~~~~~~~~~~~~~ | NonCopyablePersistentTraits /Users/akgerber/Library/Caches/node-gyp/23.3.0/include/node/v8-persistent-handle.h:223:7: note: 'NonCopyablePersistentTraits' declared here 223 | class NonCopyablePersistentTraits { | ^ In file included from ../src/better_sqlite3.cpp:4: ./src/util/macros.lzz:149:6: error: no type named 'AccessorGetterCallback' in namespace 'v8'; did you mean 'AccessorNameGetterCallback'? 149 | v8::AccessorGetterCallback func | ~~~~^~~~~~~~~~~~~~~~~~~~~~ | AccessorNameGetterCallback /Users/akgerber/Library/Caches/node-gyp/23.3.0/include/node/v8-object.h:155:7: note: 'AccessorNameGetterCallback' declared here 155 | using AccessorNameGetterCallback = | ^ ./src/util/macros.lzz:158:6: error: no type named 'AccessorGetterCallback' in namespace 'v8'; did you mean 'AccessorNameGetterCallback'? 158 | v8::AccessorGetterCallback func | ~~~~^~~~~~~~~~~~~~~~~~~~~~ | AccessorNameGetterCallback /Users/akgerber/Library/Caches/node-gyp/23.3.0/include/node/v8-object.h:155:7: note: 'AccessorNameGetterCallback' declared here 155 | using AccessorNameGetterCallback = | ^ ./src/util/macros.lzz:172:28: error: no member named 'SetAccessor' in 'v8::ObjectTemplate' 172 | recv->InstanceTemplate()->SetAccessor( | ~~~~~~~~~~~~~~~~~~~~~~~~~~^ ./src/objects/database.lzz:17:17: error: no matching function for call to 'SetPrototypeGetter' | ~~~~~~~~~~~~~~~~~~~~~~~~~~^ ./src/objects/database.lzz:17:17: error: no matching function for call to 'SetPrototypeGetter' 17 | SetPrototypeGetter(isolate, data, t, "open", JS_open); | ^~~~~~~~~~~~~~~~~~ ./src/util/macros.lzz:153:6: note: candidate function not viable: no known conversion from 'void (v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value> &)' to 'v8::AccessorNameGetterCallback' (aka 'void (*)(Local<Name>, const PropertyCallbackInfo<Value> &)') for 5th argument 153 | void SetPrototypeGetter( | ^ 154 | v8::Isolate* isolate, 155 | v8::Local<v8::External> data, 156 | v8::Local<v8::FunctionTemplate> recv, 157 | const char* name, 158 | v8::AccessorGetterCallback func | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./src/objects/database.lzz:18:17: error: no matching function for call to 'SetPrototypeGetter' 18 | SetPrototypeGetter(isolate, data, t, "inTransaction", JS_inTransaction); | ^~~~~~~~~~~~~~~~~~ ./src/util/macros.lzz:153:6: note: candidate function not viable: no known conversion from 'void (v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value> &)' to 'v8::AccessorNameGetterCallback' (aka 'void (*)(Local<Name>, const PropertyCallbackInfo<Value> &)') for 5th argument 153 | void SetPrototypeGetter( | ^ 154 | v8::Isolate* isolate, 155 | v8::Local<v8::External> data, 156 | v8::Local<v8::FunctionTemplate> recv, 157 | const char* name, 158 | v8::AccessorGetterCallback func | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./src/objects/database.lzz:180:21: warning: variable 'status' set but not used [-Wunused-but-set-variable] 180 | int status = sqlite3_db_config(db_handle, SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION, 1, NULL); | ^ ./src/objects/statement.lzz:16:17: error: no matching function for call to 'SetPrototypeGetter' 16 | SetPrototypeGetter(isolate, data, t, "busy", JS_busy); | ^~~~~~~~~~~~~~~~~~ ./src/util/macros.lzz:153:6: note: candidate function not viable: no known conversion from 'void (v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value> &)' to 'v8::AccessorNameGetterCallback' (aka 'void (*)(Local<Name>, const PropertyCallbackInfo<Value> &)') for 5th argument 153 | void SetPrototypeGetter( | ^ 154 | v8::Isolate* isolate, 155 | v8::Local<v8::External> data, 156 | v8::Local<v8::FunctionTemplate> recv, 157 | const char* name, 158 | v8::AccessorGetterCallback func | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./src/util/custom-table.lzz:45:9: warning: missing field 'xIntegrity' initializer [-Wmissing-field-initializers] 45 | }; | ^ ./src/util/custom-table.lzz:72:9: warning: missing field 'xIntegrity' initializer [-Wmissing-field-initializers] 72 | }; | ^ 3 warnings and 8 errors generated. make: *** [Release/obj.target/better_sqlite3/src/better_sqlite3.o] Error 1 rm ba23eeee118cd63e16015df367567cb043fed872.intermediate gyp ERR! build error gyp ERR! stack Error: `make` failed with exit code: 2 gyp ERR! stack at ChildProcess.<anonymous> (/Users/akgerber/Code/github/actual-server/node_modules/node-gyp/lib/build.js:209:23) gyp ERR! System Darwin 24.1.0 gyp ERR! command "/opt/homebrew/Cellar/node/23.3.0/bin/node" "/Users/akgerber/Code/github/actual-server/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release" gyp ERR! cwd /Users/akgerber/Code/github/actual-server/node_modules/better-sqlite3 gyp ERR! node -v v23.3.0 gyp ERR! node-gyp -v v10.1.0 gyp ERR! not ok ``` Some cursory Googling indicates that this may be related to recent distributions of C++ removing a long-deprecated function signature: https://github.com/WiseLibs/better-sqlite3/issues/1225 I was able to resolve the issue locally by bumping the dependency to latest version: ``` ➜ actual-server git:(master) ✗ yarn add better-sqlite3 ➤ YN0000: · Yarn 4.3.1 ➤ YN0000: ┌ Resolution step ➤ YN0085: │ + better-sqlite3@npm:11.7.0 ➤ YN0085: │ - better-sqlite3@npm:9.6.0 ➤ YN0000: └ Completed ➤ YN0000: ┌ Post-resolution validation ➤ YN0002: │ actual-sync@workspace:. doesn't provide @babel/core (p89c81), requested by @babel/preset-typescript. ➤ YN0086: │ Some peer dependencies are incorrectly met by your project; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code. ➤ YN0086: │ Some peer dependencies are incorrectly met by dependencies; run yarn explain peer-requirements for details. ➤ YN0000: └ Completed ➤ YN0000: ┌ Fetch step ➤ YN0013: │ A package was added to the project (+ 9.64 MiB). ➤ YN0000: └ Completed in 0s 490ms ➤ YN0000: ┌ Link step ➤ YN0007: │ better-sqlite3@npm:11.7.0 must be built because it never has been before or the last one failed ➤ YN0000: └ Completed in 1s 326ms ➤ YN0000: · Done with warnings in 1s 959ms ➜ actual-server git:(master) ✗ yarn install ➤ YN0000: · Yarn 4.3.1 ➤ YN0000: ┌ Resolution step ➤ YN0000: └ Completed ➤ YN0000: ┌ Post-resolution validation ➤ YN0002: │ actual-sync@workspace:. doesn't provide @babel/core (p89c81), requested by @babel/preset-typescript. ➤ YN0086: │ Some peer dependencies are incorrectly met by your project; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code. ➤ YN0086: │ Some peer dependencies are incorrectly met by dependencies; run yarn explain peer-requirements for details. ➤ YN0000: └ Completed ➤ YN0000: ┌ Fetch step ➤ YN0000: └ Completed in 0s 249ms ➤ YN0000: ┌ Link step ➤ YN0000: └ Completed ➤ YN0000: · Done with warnings in 0s 469ms ``` `actual-server` seems to run without issue on this newer version. ### Where are you hosting Actual? Locally via Yarn ### What browsers are you seeing the problem on? Other ### Operating System Mac OSX
GiteaMirror added the bug label 2026-02-28 19:49:39 -06:00
Author
Owner

@psybers commented on GitHub (Dec 13, 2024):

I can confirm this build problem on Sonoma. I was trying to update my helper scripts and hit this same issue.

@psybers commented on GitHub (Dec 13, 2024): I can confirm this build problem on Sonoma. I was trying to update my helper scripts and hit this same issue.
Author
Owner

@benricok commented on GitHub (Dec 14, 2024):

I can confirm the same problem building on arch linux

@benricok commented on GitHub (Dec 14, 2024): I can confirm the same problem building on arch linux
Author
Owner

@ru44 commented on GitHub (Dec 20, 2024):

I can confirm the same problem building on MacOS sequoia

@ru44 commented on GitHub (Dec 20, 2024): I can confirm the same problem building on MacOS sequoia
Author
Owner

@lelemm commented on GitHub (Dec 20, 2024):

try

yarn rebuild

I have had several problems with better-sqlite3 last month on another project that was solved by rebuilding it

@lelemm commented on GitHub (Dec 20, 2024): try ```bash yarn rebuild ``` I have had several problems with better-sqlite3 last month on another project that was solved by rebuilding it
Author
Owner

@svitiashchuk commented on GitHub (Jan 6, 2025):

From the log mentioned in issue, I can see that node@23 is being used.

gyp info using node@23.3.0 | darwin | arm64

The actual Budget is built using Node@18, if I’m not mistaken. If you are using Homebrew, try downgrading your Node version:

In my case, I tried with Node 20, and it seems to be working well:

brew unlink node@23
brew install node@20
brew link --overwrite --force node@20
@svitiashchuk commented on GitHub (Jan 6, 2025): From the log mentioned in issue, I can see that node@23 is being used. ``` gyp info using node@23.3.0 | darwin | arm64 ``` The actual Budget is built using Node@18, if I’m not mistaken. If you are using Homebrew, try downgrading your Node version: In my case, I tried with Node 20, and it seems to be working well: ``` brew unlink node@23 brew install node@20 brew link --overwrite --force node@20 ```
Author
Owner

@NikxDa commented on GitHub (Jan 16, 2025):

This issue is due to the version of better-sqlite3 being used, which is major version 9. Support for Node 22 (and in my testing, also 23) was only added in version 10 (see here: https://github.com/WiseLibs/better-sqlite3/releases?page=2).

This means the API can't currently be used in Node 22 and beyond. If you're using the API in your project, you can override the dependency manually in package.json:

"overrides": {
    "@actual-app/api": {
        "better-sqlite3": "^11"
    }
}

Edit: It looks like version 25.1.0 fixed this issue.

@NikxDa commented on GitHub (Jan 16, 2025): This issue is due to the version of `better-sqlite3` being used, which is major version 9. Support for Node 22 (and in my testing, also 23) was only added in version 10 (see here: https://github.com/WiseLibs/better-sqlite3/releases?page=2). ~This means the API can't currently be used in Node 22 and beyond.~ If you're using the API in your project, you can override the dependency manually in `package.json`: ``` "overrides": { "@actual-app/api": { "better-sqlite3": "^11" } } ``` Edit: It looks like version 25.1.0 fixed this issue.
Author
Owner

@matt-fidd commented on GitHub (Jan 17, 2025):

better-sqlite3 has been bumped, node 22 and 23 should now build.

@matt-fidd commented on GitHub (Jan 17, 2025): `better-sqlite3` has been bumped, node 22 and 23 should now build.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#1650