cloudflare / miniflare

🔥 Fully-local simulator for Cloudflare Workers. For the latest version, see https://github.com/cloudflare/workers-sdk/tree/main/packages/miniflare.
https://miniflare.dev
MIT License
3.78k stars 205 forks source link

BUG: cannot install this library in node 22, please update better-sqlite3 #767

Closed Omarov3000 closed 4 months ago

Omarov3000 commented 4 months ago

logs

node_modules/.pnpm/better-sqlite3@11.0.0/node_modules/better-sqlite3: Running install script, done in 2.5s
node_modules/.pnpm/better-sqlite3@8.5.0/node_modules/better-sqlite3: Running install script, failed in 16.7s
.../node_modules/better-sqlite3 install$ prebuild-install || node-gyp rebuild --release
│ prebuild-install warn install No prebuilt binaries found (target=22.1.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@22.1.0 | darwin | arm64
│ gyp info find Python using Python version 3.12.3 found at "/usr/local/bin/python3"
│ gyp info spawn /usr/local/bin/python3
│ gyp info spawn args [
│ gyp info spawn args '~/.npm-global/lib/node_modules/pnpm/dist/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 '~/Documents/uhu/unni/node_modules/.pnpm/better-sqlite3@8.5.0/node_modules/better-sqlite3/build/config.gypi',
│ gyp info spawn args '-I',
│ gyp info spawn args '~/.npm-global/lib/node_modules/pnpm/dist/node_modules/node-gyp/addon.gypi',
│ gyp info spawn args '-I',
│ gyp info spawn args '~/Library/Caches/node-gyp/22.1.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=~/Library/Caches/node-gyp/22.1.0',
│ gyp info spawn args '-Dnode_gyp_dir=~/.npm-global/lib/node_modules/pnpm/dist/node_modules/node-gyp',
│ gyp info spawn args '-Dnode_lib_file=~/Library/Caches/node-gyp/22.1.0/<(target_arch)/node.lib',
│ gyp info spawn args '-Dmodule_root_dir=~/Documents/uhu/unni/node_modules/.pnpm/better-sqlite3@8.5.0/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
│ ./src/util/macros.lzz:150:35: error: no matching member function for call to 'SetAccessor'
│         recv->InstanceTemplate()->SetAccessor(
│         ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
│ ~/Library/Caches/node-gyp/22.1.0/include/node/v8-template.h:1049:8: note: candidate function not viable: no known conversion from 'v8::AccessControl' to 'PropertyAttribute' for 5th argument
│   void SetAccessor(
│        ^
│ ~/Library/Caches/node-gyp/22.1.0/include/node/v8-template.h:1055:8: note: candidate function not viable: no known conversion from 'v8::AccessorGetterCallback' (aka 'void (*)(Local<String>, const PropertyCallbackInfo<Value> &)') to…
│   void SetAccessor(
│        ^
│ ./src/objects/database.lzz:180:21: warning: variable 'status' set but not used [-Wunused-but-set-variable]
│                 int status = sqlite3_db_config(db_handle, SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION, 1, NULL);
│                     ^
│ 1 warning and 1 error 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> (~/.npm-global/lib/node_modules/pnpm/dist/node_modules/node-gyp/lib/build.js:209:23)
│ gyp ERR! System Darwin 23.5.0
│ gyp ERR! command "~/.nodenv/versions/22.1.0/bin/node" "~/.npm-global/lib/node_modules/pnpm/dist/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release"
│ gyp ERR! cwd ~/Documents/uhu/unni/node_modules/.pnpm/better-sqlite3@8.5.0/node_modules/better-sqlite3
│ gyp ERR! node -v v22.1.0
│ gyp ERR! node-gyp -v v10.1.0
│ gyp ERR! not ok 
└─ Failed in 16.7s at ~/Documents/uhu/unni/node_modules/.pnpm/better-sqlite3@8.5.0/node_modules/better-sqlite3
node_modules/.pnpm/@dep-tree+cli@0.17.5/node_modules/@dep-tree/cli: Running postinstall script...
petebacondarwin commented 4 months ago

This repository is for Miniflare 2, which is only receiving critical security updates. If this problem persists with Miniflare 3, please create an issue on https://github.com/cloudflare/workers-sdk