bluesky-social / atproto

Social networking technology created by Bluesky
Other
7.49k stars 535 forks source link

Unable to build (better-sqlite3) #962

Closed awesomepandapig closed 1 year ago

awesomepandapig commented 1 year ago

I am trying to build the package on my M2 Macbook.

running make deps successfully installs packages until it gets to better-sqlite3 which causes the installation process to stop.

jasonmartens commented 1 year ago

Same problem here, full build output:

jason@Jasons-Air-379 atproto % make deps
yarn install --frozen-lockfile
yarn install v1.22.19
[1/5] 🔍  Validating package.json...
[2/5] 🔍  Resolving packages...
[3/5] 🚚  Fetching packages...
[4/5] 🔗  Linking dependencies...
warning "workspace-aggregator-c6d7a044-80a1-4718-8a13-f371f5176876 > @atproto/aws > @aws-sdk/lib-storage@3.226.0" has unmet peer dependency "@aws-sdk/abort-controller@^3.0.0".
warning Workspaces can only be enabled in private projects.
warning Workspaces can only be enabled in private projects.
[5/5] 🔨  Building fresh packages...
[-/5] ⠠ waiting...
[2/5] ⠠ esbuild
[-/5] ⠠ waiting...
[4/5] ⠠ better-sqlite3
error /Users/jason/code/atproto/node_modules/better-sqlite3: Command failed.
Exit code: 1
Command: prebuild-install || npm run build-release
Arguments: 
Directory: /Users/jason/code/atproto/node_modules/better-sqlite3
Output:
prebuild-install warn install No prebuilt binaries found (target=18.16.0 runtime=node arch=arm64 libc= platform=darwin)

> 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@7.1.2
gyp info using node@18.16.0 | darwin | arm64
gyp info find Python using Python version 3.11.3 found at "/opt/homebrew/opt/python@3.11/bin/python3.11"
(node:70907) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
(Use `node --trace-deprecation ...` to show where the warning was created)
gyp info spawn /opt/homebrew/opt/python@3.11/bin/python3.11
gyp info spawn args [
gyp info spawn args   '/Users/jason/code/atproto/node_modules/@npmcli/run-script/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/jason/code/atproto/node_modules/better-sqlite3/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/jason/code/atproto/node_modules/@npmcli/run-script/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/jason/Library/Caches/node-gyp/18.16.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/jason/Library/Caches/node-gyp/18.16.0',
gyp info spawn args   '-Dnode_gyp_dir=/Users/jason/code/atproto/node_modules/@npmcli/run-script/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/Users/jason/Library/Caches/node-gyp/18.16.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/Users/jason/code/atproto/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 ]
Traceback (most recent call last):
  File "/Users/jason/code/atproto/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/gyp_main.py", line 51, in <module>
    sys.exit(gyp.script_main())
             ^^^^^^^^^^^^^^^^^
  File "/Users/jason/code/atproto/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 670, in script_main
    return main(sys.argv[1:])
           ^^^^^^^^^^^^^^^^^^
  File "/Users/jason/code/atproto/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 662, in main
    return gyp_main(args)
           ^^^^^^^^^^^^^^
  File "/Users/jason/code/atproto/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 629, in gyp_main
    [generator, flat_list, targets, data] = Load(
                                            ^^^^^
  File "/Users/jason/code/atproto/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 150, in Load
    result = gyp.input.Load(
             ^^^^^^^^^^^^^^^
  File "/Users/jason/code/atproto/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 3021, in Load
    LoadTargetBuildFile(
  File "/Users/jason/code/atproto/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 411, in LoadTargetBuildFile
    build_file_data = LoadOneBuildFile(
                      ^^^^^^^^^^^^^^^^^
  File "/Users/jason/code/atproto/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 239, in LoadOneBuildFile
    build_file_contents = open(build_file_path, "rU").read()
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: invalid mode: 'rU' 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.onCpExit (/Users/jason/code/atproto/node_modules/@npmcli/run-script/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:291:12)
gyp ERR! System Darwin 22.4.0
gyp ERR! command "/Users/jason/.nvm/versions/node/v18.16.0/bin/node" "/Users/jason/code/atproto/node_modules/.bin/node-gyp" "rebuild" "--release"
gyp ERR! cwd /Users/jason/code/atproto/node_modules/better-sqlite3

make: *** [deps] Error 1
jasonmartens commented 1 year ago

Hm, at least one problem seems to be that python3.11 has a bug/issue with node gyp: https://stackoverflow.com/questions/74715990/node-gyp-err-invalid-mode-ru-while-trying-to-load-binding-gyp

Uninstalling brew python3 (which was 3.11) and using system default 3.9 python fixed that error, but now I have another:

jason@Jasons-Air-379 atproto % make deps
yarn install --frozen-lockfile
yarn install v1.22.19
[1/5] 🔍  Validating package.json...
[2/5] 🔍  Resolving packages...
[3/5] 🚚  Fetching packages...
[4/5] 🔗  Linking dependencies...
warning "workspace-aggregator-f2506ba3-bdb5-467a-bc30-d54f27a28080 > @atproto/aws > @aws-sdk/lib-storage@3.226.0" has unmet peer dependency "@aws-sdk/abort-controller@^3.0.0".
warning Workspaces can only be enabled in private projects.
warning Workspaces can only be enabled in private projects.
[5/5] 🔨  Building fresh packages...
[-/5] ⠁ waiting...
[2/5] ⠁ esbuild
[-/5] ⠁ waiting...
[4/5] ⠁ better-sqlite3
error /Users/jason/code/atproto/node_modules/better-sqlite3: Command failed.
Exit code: 1
Command: prebuild-install || npm run build-release
Arguments: 
Directory: /Users/jason/code/atproto/node_modules/better-sqlite3
Output:
prebuild-install warn install No prebuilt binaries found (target=18.16.0 runtime=node arch=arm64 libc= platform=darwin)

> 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@7.1.2
gyp info using node@18.16.0 | darwin | arm64
gyp info find Python using Python version 3.9.6 found at "/Library/Developer/CommandLineTools/usr/bin/python3"
(node:73740) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
(Use `node --trace-deprecation ...` to show where the warning was created)
gyp info spawn /Library/Developer/CommandLineTools/usr/bin/python3
gyp info spawn args [
gyp info spawn args   '/Users/jason/code/atproto/node_modules/@npmcli/run-script/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/jason/code/atproto/node_modules/better-sqlite3/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/jason/code/atproto/node_modules/@npmcli/run-script/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/jason/Library/Caches/node-gyp/18.16.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/jason/Library/Caches/node-gyp/18.16.0',
gyp info spawn args   '-Dnode_gyp_dir=/Users/jason/code/atproto/node_modules/@npmcli/run-script/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/Users/jason/Library/Caches/node-gyp/18.16.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/Users/jason/code/atproto/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
env: python: No such file or directory
make[1]: *** [Release/sqlite3.a] Error 127
rm ba23eeee118cd63e16015df367567cb043fed872.intermediate
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/jason/code/atproto/node_modules/@npmcli/run-script/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:291:12)
gyp ERR! System Darwin 22.4.0
gyp ERR! command "/Users/jason/.nvm/versions/node/v18.16.0/bin/node" "/Users/jason/code/atproto/node_modules/.bin/node-gyp" "rebuild" "--release"
gyp ERR! cwd /Users/jason/code/atproto/node_modules/better-sqlite3

make: *** [deps] Error 1
jason@Jasons-Air-379 atproto % 

Looks like something wants python2.7?

jasonmartens commented 1 year ago

Eventually discovered you need python 2 and 3, so install pyenv and set both versions: pyenv install 3.9.16 pyenv install 2.7.18 pyenv global 3.9.16 2.7.18

Then run make dep again

awesomepandapig commented 1 year ago

I followed your steps and the issue remains

rojvv commented 1 year ago

Well, maybe you can just ignore that error if you are possibly working on something unrelated to SQLite. You can still run the tests using yarn test and build the code. Language server works fine.

awesomepandapig commented 1 year ago

I'm not sure what you are talking about. Building fails without the dependencies installed, and the issue I am having is with installing the dependencies.

rojvv commented 1 year ago

Install the dependencies, ignore the error, and try building. I didn’t mean to not install the dependencies.

rojvv commented 1 year ago

Well, this was my error. Just in case. You haven’t provided enough information about yours.

image

awesomepandapig commented 1 year ago

Building works but then when I try to run the actual commands they still fail because they are missing better-sqlite3

Here's the output I get from running make run-dev-env:

cd packages/dev-env; yarn run start
yarn run v1.22.19
$ node dist/cli.js

██████╗
██╔═══██╗
██║██╗██║
██║██║██║
╚█║████╔╝
 ╚╝╚═══╝  protocol

[  v0.1.0  | created by Bluesky ]

Initializing...
[2582] 👤 DID Placeholder server started http://localhost:2582
/Users/awesomepandapig/Desktop/atproto/node_modules/bindings/bindings.js:126
  err = new Error(
        ^

Error: Could not locate the bindings file. Tried:
 → /Users/awesomepandapig/Desktop/atproto/node_modules/better-sqlite3/build/better_sqlite3.node
 → /Users/awesomepandapig/Desktop/atproto/node_modules/better-sqlite3/build/Debug/better_sqlite3.node
 → /Users/awesomepandapig/Desktop/atproto/node_modules/better-sqlite3/build/Release/better_sqlite3.node
 → /Users/awesomepandapig/Desktop/atproto/node_modules/better-sqlite3/out/Debug/better_sqlite3.node
 → /Users/awesomepandapig/Desktop/atproto/node_modules/better-sqlite3/Debug/better_sqlite3.node
 → /Users/awesomepandapig/Desktop/atproto/node_modules/better-sqlite3/out/Release/better_sqlite3.node
 → /Users/awesomepandapig/Desktop/atproto/node_modules/better-sqlite3/Release/better_sqlite3.node
 → /Users/awesomepandapig/Desktop/atproto/node_modules/better-sqlite3/build/default/better_sqlite3.node
 → /Users/awesomepandapig/Desktop/atproto/node_modules/better-sqlite3/compiled/20.0.0/darwin/arm64/better_sqlite3.node
 → /Users/awesomepandapig/Desktop/atproto/node_modules/better-sqlite3/addon-build/release/install-root/better_sqlite3.node
 → /Users/awesomepandapig/Desktop/atproto/node_modules/better-sqlite3/addon-build/debug/install-root/better_sqlite3.node
 → /Users/awesomepandapig/Desktop/atproto/node_modules/better-sqlite3/addon-build/default/install-root/better_sqlite3.node
 → /Users/awesomepandapig/Desktop/atproto/node_modules/better-sqlite3/lib/binding/node-v115-darwin-arm64/better_sqlite3.node
    at bindings (/Users/awesomepandapig/Desktop/atproto/node_modules/bindings/bindings.js:126:9)
    at new Database (/Users/awesomepandapig/Desktop/atproto/node_modules/better-sqlite3/lib/database.js:48:64)
    at Database.sqlite (/Users/awesomepandapig/Desktop/atproto/packages/dev-env/dist/cli.js:238400:19)
    at Database.memory (/Users/awesomepandapig/Desktop/atproto/packages/dev-env/dist/cli.js:238429:21)
    at DevEnvServer.start (/Users/awesomepandapig/Desktop/atproto/packages/dev-env/dist/cli.js:249979:35)
    at DevEnv.add (/Users/awesomepandapig/Desktop/atproto/packages/dev-env/dist/cli.js:250098:18)
    at createNeededServers (/Users/awesomepandapig/Desktop/atproto/packages/dev-env/dist/cli.js:250232:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async generateMockSetup (/Users/awesomepandapig/Desktop/atproto/packages/dev-env/dist/cli.js:250237:3)
    at async start (/Users/awesomepandapig/Desktop/atproto/packages/dev-env/dist/cli.js:250534:3) {
  tries: [
    '/Users/awesomepandapig/Desktop/atproto/node_modules/better-sqlite3/build/better_sqlite3.node',
    '/Users/awesomepandapig/Desktop/atproto/node_modules/better-sqlite3/build/Debug/better_sqlite3.node',
    '/Users/awesomepandapig/Desktop/atproto/node_modules/better-sqlite3/build/Release/better_sqlite3.node',
    '/Users/awesomepandapig/Desktop/atproto/node_modules/better-sqlite3/out/Debug/better_sqlite3.node',
    '/Users/awesomepandapig/Desktop/atproto/node_modules/better-sqlite3/Debug/better_sqlite3.node',
    '/Users/awesomepandapig/Desktop/atproto/node_modules/better-sqlite3/out/Release/better_sqlite3.node',
    '/Users/awesomepandapig/Desktop/atproto/node_modules/better-sqlite3/Release/better_sqlite3.node',
    '/Users/awesomepandapig/Desktop/atproto/node_modules/better-sqlite3/build/default/better_sqlite3.node',
    '/Users/awesomepandapig/Desktop/atproto/node_modules/better-sqlite3/compiled/20.0.0/darwin/arm64/better_sqlite3.node',
    '/Users/awesomepandapig/Desktop/atproto/node_modules/better-sqlite3/addon-build/release/install-root/better_sqlite3.node',
    '/Users/awesomepandapig/Desktop/atproto/node_modules/better-sqlite3/addon-build/debug/install-root/better_sqlite3.node',
    '/Users/awesomepandapig/Desktop/atproto/node_modules/better-sqlite3/addon-build/default/install-root/better_sqlite3.node',
    '/Users/awesomepandapig/Desktop/atproto/node_modules/better-sqlite3/lib/binding/node-v115-darwin-arm64/better_sqlite3.node'
  ]
}

Node.js v20.0.0
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
make: *** [run-dev-env] Error 1
rojvv commented 1 year ago

Good to here that building works. (It actually lets you contribute to many parts.) I have no idea about this one tho.

dholms commented 1 year ago

I've run into this before -- something about node-gyp getting angry with python >=3.11 if you downgrade to python@3.10, it should be able to install & build (then you can reinstall 3.11 just fine)

there's a longer term solution that i haven't fully found yet 😛

alexjg commented 1 year ago

Upgrading to better-sqlite3@8.3.0 fixes this issue for me (although that might just be because there are prebuilt binaries available for node 19, which is what I'm using). Is there any reason not to upgrade? The changelog for better-sqlite3 suggests that the only breaking change is dropping node 12 and below, maybe that's important though?

(Oh I also have to explicitly depend on the latest node-gyp as well)

aleclarson commented 1 year ago

Downgrading to Node 18 was the only thing that worked for me. First tried with Node 19 and then Node 20. Then tried downgrading Python to 3.10 (as suggested by @dholms) to no avail.

I was seeing these errors related to V8:

Node 19

  In file included from ../src/better_sqlite3.cpp:4:
  In file included from ./src/better_sqlite3.lzz:11:
  In file included from  ~/Library/Caches/node-gyp/19.0.0/include/node/node.h:73:
  In file included from  ~/Library/Caches/node-gyp/19.0.0/include/node/v8.h:24:
  In file included from  ~/Library/Caches/node-gyp/19.0.0/include/node/v8-array-buffe…
  In file included from  ~/Library/Caches/node-gyp/19.0.0/include/node/v8-object.h:9:
   ~/Library/Caches/node-gyp/19.0.0/include/node/v8-maybe.h:106:45: error: no templat…
    template <class U, std::enable_if_t<!std::is_lvalue_reference_v<U>>*>
                                         ~~~~~^~~~~~~~~~~~~~~~~~~~~
                                              is_lvalue_reference
  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.s…
  struct _LIBCPP_TEMPLATE_VIS is_lvalue_reference : _BoolConstant<__is_lvalue_reference(_Tp)> …
                              ^
  In file included from ../src/better_sqlite3.cpp:4:
  In file included from ./src/better_sqlite3.lzz:11:
  In file included from  ~/Library/Caches/node-gyp/19.0.0/include/node/node.h:73:
  In file included from  ~/Library/Caches/node-gyp/19.0.0/include/node/v8.h:24:
  In file included from  ~/Library/Caches/node-gyp/19.0.0/include/node/v8-array-buffe…
  In file included from  ~/Library/Caches/node-gyp/19.0.0/include/node/v8-object.h:9:
   ~/Library/Caches/node-gyp/19.0.0/include/node/v8-maybe.h:106:69: error: expected '…
    template <class U, std::enable_if_t<!std::is_lvalue_reference_v<U>>*>
                                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
   ~/Library/Caches/node-gyp/19.0.0/include/node/v8-maybe.h:123:43: error: no templat…
  template <class T, std::enable_if_t<!std::is_lvalue_reference_v<T>>* = nullptr>
                                       ~~~~~^~~~~~~~~~~~~~~~~~~~~
                                            is_lvalue_reference
  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.s…
  struct _LIBCPP_TEMPLATE_VIS is_lvalue_reference : _BoolConstant<__is_lvalue_reference(_Tp)> …
                              ^
  In file included from ../src/better_sqlite3.cpp:4:
  In file included from ./src/better_sqlite3.lzz:11:
  In file included from  ~/Library/Caches/node-gyp/19.0.0/include/node/node.h:73:
  In file included from  ~/Library/Caches/node-gyp/19.0.0/include/node/v8.h:24:
  In file included from  ~/Library/Caches/node-gyp/19.0.0/include/node/v8-array-buffe…
  In file included from  ~/Library/Caches/node-gyp/19.0.0/include/node/v8-object.h:9:
   ~/Library/Caches/node-gyp/19.0.0/include/node/v8-maybe.h:123:67: error: expected '…
  template <class T, std::enable_if_t<!std::is_lvalue_reference_v<T>>* = nullptr>
                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
  ./src/util/macros.lzz:157:21: error: no member named 'AccessorSignature' in namespace 'v8'
                  v8::AccessorSignature::New(isolate, recv)
                  ~~~~^
  ./src/objects/database.lzz:180:21: warning: variable 'status' set but not used [-Wunused-but…
                  int status = sqlite3_db_config(db_handle, SQLITE_DBCONFIG_ENABLE_LOAD_EXTENS…
                      ^
  ./src/util/binder.lzz:37:51: error: no member named 'CreationContext' in 'v8::Object'
                  v8::Local<v8::Context> ctx = obj->CreationContext();
                                               ~~~~~^
  20 warnings and 6 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.onExit ( ~/dev/oss/atproto/node_modules/.pnpm/no…
  gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
  gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:293:12)
  gyp ERR! System Darwin 21.6.0
  gyp ERR! command " ~/.nvm/versions/node/v19.0.0/bin/node" " ~/dev/oss/atpr…
  gyp ERR! cwd  ~/dev/oss/atproto/node_modules/.pnpm/better-sqlite3@7.6.2/node_module…
  gyp ERR! node -v v19.0.0
  gyp ERR! node-gyp -v v9.3.1
  gyp ERR! not ok

Node 20

  In file included from ../src/better_sqlite3.cpp:4:
  In file included from ./src/better_sqlite3.lzz:11:
  In file included from ~/Library/Caches/node-gyp/20.6.0/include/node/node.h:73:
  In file included from ~/Library/Caches/node-gyp/20.6.0/include/node/v8.h:24:
  In file included from ~/Library/Caches/node-gyp/20.6.0/include/node/v8-array-buffe…
  In file included from ~/Library/Caches/node-gyp/20.6.0/include/node/v8-object.h:9:
  ~/Library/Caches/node-gyp/20.6.0/include/node/v8-maybe.h:106:45: error: no templat…
    template <class U, std::enable_if_t<!std::is_lvalue_reference_v<U>>*>
                                         ~~~~~^~~~~~~~~~~~~~~~~~~~~
                                              is_lvalue_reference
  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.s…
  struct _LIBCPP_TEMPLATE_VIS is_lvalue_reference : _BoolConstant<__is_lvalue_reference(_Tp)> …
                              ^
  In file included from ../src/better_sqlite3.cpp:4:
  In file included from ./src/better_sqlite3.lzz:11:
  In file included from ~/Library/Caches/node-gyp/20.6.0/include/node/node.h:73:
  In file included from ~/Library/Caches/node-gyp/20.6.0/include/node/v8.h:24:
  In file included from ~/Library/Caches/node-gyp/20.6.0/include/node/v8-array-buffe…
  In file included from ~/Library/Caches/node-gyp/20.6.0/include/node/v8-object.h:9:
  ~/Library/Caches/node-gyp/20.6.0/include/node/v8-maybe.h:106:69: error: expected '…
    template <class U, std::enable_if_t<!std::is_lvalue_reference_v<U>>*>
                                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
  ~/Library/Caches/node-gyp/20.6.0/include/node/v8-maybe.h:123:43: error: no templat…
  template <class T, std::enable_if_t<!std::is_lvalue_reference_v<T>>* = nullptr>
                                       ~~~~~^~~~~~~~~~~~~~~~~~~~~
                                            is_lvalue_reference
  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.s…
  struct _LIBCPP_TEMPLATE_VIS is_lvalue_reference : _BoolConstant<__is_lvalue_reference(_Tp)> …
                              ^
  In file included from ../src/better_sqlite3.cpp:4:
  In file included from ./src/better_sqlite3.lzz:11:
  In file included from ~/Library/Caches/node-gyp/20.6.0/include/node/node.h:73:
  In file included from ~/Library/Caches/node-gyp/20.6.0/include/node/v8.h:24:
  In file included from ~/Library/Caches/node-gyp/20.6.0/include/node/v8-array-buffe…
  In file included from ~/Library/Caches/node-gyp/20.6.0/include/node/v8-object.h:9:
  ~/Library/Caches/node-gyp/20.6.0/include/node/v8-maybe.h:123:67: error: expected '…
  template <class T, std::enable_if_t<!std::is_lvalue_reference_v<T>>* = nullptr>
                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
  In file included from ../src/better_sqlite3.cpp:4:
  In file included from ./src/better_sqlite3.lzz:11:
  In file included from ~/Library/Caches/node-gyp/20.6.0/include/node/node.h:73:
  In file included from ~/Library/Caches/node-gyp/20.6.0/include/node/v8.h:33:
  In file included from ~/Library/Caches/node-gyp/20.6.0/include/node/v8-function.h:…
  ~/Library/Caches/node-gyp/20.6.0/include/node/v8-function-callback.h:151:66: warni…
                  kReturnValueDefaultValueIndex - kReturnValueIndex);
                                                                   ^
                                                                   , ""
  ~/Library/Caches/node-gyp/20.6.0/include/node/v8-function-callback.h:153:50: warni…
                  kIsolateIndex - kReturnValueIndex);
                                                   ^
                                                   , ""
  ./src/util/macros.lzz:157:21: error: no member named 'AccessorSignature' in namespace 'v8'
                  v8::AccessorSignature::New(isolate, recv)
                  ~~~~^
  ./src/objects/database.lzz:180:21: warning: variable 'status' set but not used [-Wunused-but…
                  int status = sqlite3_db_config(db_handle, SQLITE_DBCONFIG_ENABLE_LOAD_EXTENS…
                      ^
  ./src/util/binder.lzz:37:51: error: no member named 'CreationContext' in 'v8::Object'
                  v8::Local<v8::Context> ctx = obj->CreationContext();
                                               ~~~~~^
  23 warnings and 6 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.onExit (~/.nvm/versions/node/v20.6.0/lib/node_m…
  gyp ERR! stack     at ChildProcess.emit (node:events:514:28)
  gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:294:12)
  gyp ERR! System Darwin 21.6.0
  gyp ERR! command "~/.nvm/versions/node/v20.6.0/bin/node" "~/.nvm/version…
  gyp ERR! cwd ~/dev/oss/atproto/node_modules/.pnpm/better-sqlite3@7.6.2/node_module…
  gyp ERR! node -v v20.6.0
  gyp ERR! node-gyp -v v9.4.0
  gyp ERR! not ok