Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

a yarn on ubuntu 23 #1224

Closed
interfaith opened this issue Sep 2, 2023 · 3 comments
Closed

a yarn on ubuntu 23 #1224

interfaith opened this issue Sep 2, 2023 · 3 comments

Comments

@interfaith
Copy link

[5/5] Building fresh packages...
error /home/spowage/foal/my-app/node_modules/better-sqlite3: Command failed.
Exit code: 1
Command: prebuild-install || npm run build-release
Arguments:
Directory: /home/spowage/foal/my-app/node_modules/better-sqlite3
Output:
prebuild-install warn install No prebuilt binaries found (target=20.5.1 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@9.4.0
gyp info using node@20.5.1 | linux | x64
gyp info find Python using Python version 3.11.4 found at "/usr/bin/python3"
gyp info spawn /usr/bin/python3
gyp info spawn args [
gyp info spawn args '/home/spowage/.nvm/versions/node/v20.5.1/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 '/home/spowage/foal/my-app/node_modules/better-sqlite3/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/home/spowage/.nvm/versions/node/v20.5.1/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/home/spowage/.cache/node-gyp/20.5.1/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/home/spowage/.cache/node-gyp/20.5.1',
gyp info spawn args '-Dnode_gyp_dir=/home/spowage/.nvm/versions/node/v20.5.1/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/home/spowage/.cache/node-gyp/20.5.1/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/home/spowage/foal/my-app/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 '/home/spowage/foal/my-app/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:
/home/spowage/.cache/node-gyp/20.5.1/include/node/node.h:1186:7: warning: cast between incompatible function types from ‘void ()(v8::Localv8::Object, v8::Localv8::Value, v8::Localv8::Context)’ to ‘node::addon_context_register_func’ {aka ‘void ()(v8::Localv8::Object, v8::Localv8::Value, v8::Localv8::Context, void*)’} [-Wcast-function-type]
1186 | (node::addon_context_register_func) (regfunc),
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/spowage/.cache/node-gyp/20.5.1/include/node/node.h:1204:3: note: in expansion of macro ‘NODE_MODULE_CONTEXT_AWARE_X’
1204 | NODE_MODULE_CONTEXT_AWARE_X(modname, regfunc, NULL, 0)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/spowage/.cache/node-gyp/20.5.1/include/node/node.h:1235:3: note: in expansion of macro ‘NODE_MODULE_CONTEXT_AWARE’
1235 | 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::Localv8::External, v8::Localv8::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::Localv8::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::Localv8::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::Localv8::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 '/home/spowage/foal/my-app/node_modules/better-sqlite3/build'
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/home/spowage/.nvm/versions/node/v20.5.1/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:203:23)
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 Linux 6.2.0-31-generic
gyp ERR! command "/home/spowage/.nvm/versions/node/v20.5.1/bin/node" "/home/spowage/.nvm/versions/node/v20.5.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release"
gyp ERR! cwd /home/spowage/foal/my-app/node_modules/better-sqlite3
gyp ERR! node -v v20.5.1
gyp ERR! node-gyp -v v9.4.0
gyp ERR! not ok
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
spowage@teleden:~/foal/my-app

@LoicPoullain
Copy link
Member

If you update the file config/default.json as follows and run these commands, does it work?

{
  "port": "env(PORT)",
  "settings": {
    "loggerFormat": "tiny",
    "session": {
      "store": "@foal/typeorm"
    }
  },
  "database": {
    "type": "sqlite",
    "database": "./db.sqlite3"
  }
}
npm uninstall better-sqlite3
npm install sqlite3

@interfaith
Copy link
Author

interfaith commented Sep 3, 2023 via email

@LoicPoullain
Copy link
Member

Should be fixed in v4 #1222

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants