michael / editable-website

A SvelteKit template for building CMS-free editable websites
https://editable.website
MIT License
1.52k stars 120 forks source link

Can't find a way to install on Debian #27

Open teotimepacreau opened 5 months ago

teotimepacreau commented 5 months ago

I've installed globally sqlite3, better-sqlite3, node-gyp, and i'm running on Node v22.2.0 can't find a way to install on my Debian 12 I've began by the git cloning the repo as explained in the Readme

root@root:/home/tp/Bureau/Apprendre_frontend/editable-website# npm install
npm error code 1
npm error path /home/tp/Bureau/Apprendre_frontend/editable-website/node_modules/better-sqlite3
npm error command failed
npm error command sh -c prebuild-install || node-gyp rebuild --release
npm error make : on entre dans le répertoire « /home/tp/Bureau/Apprendre_frontend/editable-website/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 : on quitte le répertoire « /home/tp/Bureau/Apprendre_frontend/editable-website/node_modules/better-sqlite3/build »
npm error prebuild-install warn install No prebuilt binaries found (target=22.2.0 runtime=node arch=x64 libc= platform=linux)
npm error gyp info it worked if it ends with ok
npm error gyp info using node-gyp@10.1.0
npm error gyp info using node@22.2.0 | linux | x64
npm error gyp info find Python using Python version 3.11.2 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 '/usr/local/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/tp/Bureau/Apprendre_frontend/editable-website/node_modules/better-sqlite3/build/config.gypi',
npm error gyp info spawn args '-I',
npm error gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm error gyp info spawn args '-I',
npm error gyp info spawn args '/root/.cache/node-gyp/22.2.0/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=/root/.cache/node-gyp/22.2.0',
npm error gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
npm error gyp info spawn args '-Dnode_lib_file=/root/.cache/node-gyp/22.2.0/<(target_arch)/node.lib',
npm error gyp info spawn args '-Dmodule_root_dir=/home/tp/Bureau/Apprendre_frontend/editable-website/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 /root/.cache/node-gyp/22.2.0/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 /root/.cache/node-gyp/22.2.0/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 /root/.cache/node-gyp/22.2.0/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 /root/.cache/node-gyp/22.2.0/include/node/v8-function.h:15,
npm error                  from /root/.cache/node-gyp/22.2.0/include/node/v8.h:33,
npm error                  from /root/.cache/node-gyp/22.2.0/include/node/node.h:73:
npm error /root/.cache/node-gyp/22.2.0/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 /root/.cache/node-gyp/22.2.0/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 /root/.cache/node-gyp/22.2.0/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 /root/.cache/node-gyp/22.2.0/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:120 : Release/obj.target/better_sqlite3/src/better_sqlite3.o] Erreur 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> (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:209:23)
npm error gyp ERR! System Linux 6.1.0-21-amd64
npm error gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release"
npm error gyp ERR! cwd /home/tp/Bureau/Apprendre_frontend/editable-website/node_modules/better-sqlite3
npm error gyp ERR! node -v v22.2.0
npm error gyp ERR! node-gyp -v v10.1.0
npm error gyp ERR! not ok

npm error A complete log of this run can be found in: /root/.npm/_logs/2024-06-05T09_31_43_230Z-debug-0.log``root@root:/home/tp/Bureau/Apprendre_frontend/editable-website# npm install
npm error code 1
npm error path /home/tp/Bureau/Apprendre_frontend/editable-website/node_modules/better-sqlite3
npm error command failed
npm error command sh -c prebuild-install || node-gyp rebuild --release
npm error make : on entre dans le répertoire « /home/tp/Bureau/Apprendre_frontend/editable-website/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 : on quitte le répertoire « /home/tp/Bureau/Apprendre_frontend/editable-website/node_modules/better-sqlite3/build »
npm error prebuild-install warn install No prebuilt binaries found (target=22.2.0 runtime=node arch=x64 libc= platform=linux)
npm error gyp info it worked if it ends with ok
npm error gyp info using node-gyp@10.1.0
npm error gyp info using node@22.2.0 | linux | x64
npm error gyp info find Python using Python version 3.11.2 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 '/usr/local/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/tp/Bureau/Apprendre_frontend/editable-website/node_modules/better-sqlite3/build/config.gypi',
npm error gyp info spawn args '-I',
npm error gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm error gyp info spawn args '-I',
npm error gyp info spawn args '/root/.cache/node-gyp/22.2.0/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=/root/.cache/node-gyp/22.2.0',
npm error gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
npm error gyp info spawn args '-Dnode_lib_file=/root/.cache/node-gyp/22.2.0/<(target_arch)/node.lib',
npm error gyp info spawn args '-Dmodule_root_dir=/home/tp/Bureau/Apprendre_frontend/editable-website/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 /root/.cache/node-gyp/22.2.0/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 /root/.cache/node-gyp/22.2.0/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 /root/.cache/node-gyp/22.2.0/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 /root/.cache/node-gyp/22.2.0/include/node/v8-function.h:15,
npm error                  from /root/.cache/node-gyp/22.2.0/include/node/v8.h:33,
npm error                  from /root/.cache/node-gyp/22.2.0/include/node/node.h:73:
npm error /root/.cache/node-gyp/22.2.0/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 /root/.cache/node-gyp/22.2.0/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 /root/.cache/node-gyp/22.2.0/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 /root/.cache/node-gyp/22.2.0/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:120 : Release/obj.target/better_sqlite3/src/better_sqlite3.o] Erreur 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> (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:209:23)
npm error gyp ERR! System Linux 6.1.0-21-amd64
npm error gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release"
npm error gyp ERR! cwd /home/tp/Bureau/Apprendre_frontend/editable-website/node_modules/better-sqlite3
npm error gyp ERR! node -v v22.2.0
npm error gyp ERR! node-gyp -v v10.1.0
npm error gyp ERR! not ok

npm error A complete log of this run can be found in: /root/.npm/_logs/2024-06-05T09_31_43_230Z-debug-0.log`
ecreationstudio commented 5 months ago

same issue on a mac

ecreationstudio commented 5 months ago

same issue on a mac

downgrade to node v20 fix this issue

michael commented 5 months ago

Yeah, please go with the LTS Node version. The issue might be temporary anyways. @teotimepacreau does this fix it for you too?

Also, consider this repo more as a starting point (and implement your own page structure), not as a complete app. Will do my best to keep things running though. Once Svelte 5 is out, I'd like to invest some time to upgrade all dependencies.