Plugin: Lox2MQTT

Einklappen
X
 
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge
  • Gabriel R.
    Azubi
    • In den letzten 2 Wochen
    • 2

    #61
    Hi nufke
    I also have the problem that my Lox2Mqtt plugin is in the "Lox2MQTT not running" state.
    I have the latest version (version 0.8.0), but no matter what I try, the plugin will not start (reinstall already tried, with and without config also).
    Then I checked if I can start the plugin manually with "npm start" (in the plugin folder).
    The status is "online", but when I run "npm run status" I get status "stopped".
    When I look at the logs with npm run logs I get this output:

    Code:
    loxberry@loxberry:~/bin/plugins/lox2mqtt $ npm start
    > lox2mqtt@0.8.0 start
    > PM2_HOME=$(pwd)/.pm2 pm2 start ecosystem.custom.config.js --watch
    [PM2] Applying action restartProcessId on app [Lox2MQTT](ids: [ 0 ])
    [PM2] [Lox2MQTT](0) ✓
    ┌────┬─────────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐
    │ id │ name │ namespace │ version │ mode │ pid │ uptime │ ↺ │ status │ cpu │ mem │ user │ watching │
    ├────┼─────────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤
    │ 0 │ Lox2MQTT │ default │ 0.8.0 │ fork │ 5847 │ 0s │ 0 │ online │ 0% │ 28.1mb │ loxberry │ disabled │
    └────┴─────────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘
    loxberry@loxberry:~/bin/plugins/lox2mqtt $ npm run status
    > lox2mqtt@0.8.0 status
    > PM2_HOME=$(pwd)/.pm2 pm2 status
    ┌────┬─────────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐
    │ id │ name │ namespace │ version │ mode │ pid │ uptime │ ↺ │ status │ cpu │ mem │ user │ watching │
    ├────┼─────────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤
    │ 0 │ Lox2MQTT │ default │ 0.8.0 │ fork │ 0 │ 0 │ 0 │ stopped │ 0% │ 0b │ loxberry │ disabled │
    └────┴─────────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘
    loxberry@loxberry:~/bin/plugins/lox2mqtt $ npm run logs
    > lox2mqtt@0.8.0 logs
    > PM2_HOME=$(pwd)/.pm2 pm2 logs
    [TAILING] Tailing last 15 lines for [all] processes (change the value with --lines option)
    /opt/loxberry/bin/plugins/lox2mqtt/.pm2/pm2.log last 15 lines:
    PM2 | 2025-02-06T11:12:01: PM2 log: BUS socket file : /opt/loxberry/bin/plugins/lox2mqtt/.pm2/pub.sock
    PM2 | 2025-02-06T11:12:01: PM2 log: Application log path : /opt/loxberry/bin/plugins/lox2mqtt/.pm2/logs
    PM2 | 2025-02-06T11:12:01: PM2 log: Worker Interval : 30000
    PM2 | 2025-02-06T11:12:01: PM2 log: Process dump file : /opt/loxberry/bin/plugins/lox2mqtt/.pm2/dump.pm2
    PM2 | 2025-02-06T11:12:01: PM2 log: Concurrent actions : 2
    PM2 | 2025-02-06T11:12:01: PM2 log: SIGTERM timeout : 1600
    PM2 | 2025-02-06T11:12:01: PM2 log: ===============================================================================
    PM2 | 2025-02-06T11:12:02: PM2 log: [Watch] Start watching Lox2MQTT
    PM2 | 2025-02-06T11:12:02: PM2 log: App [Lox2MQTT:0] starting in -fork mode-
    PM2 | 2025-02-06T11:12:02: PM2 log: App [Lox2MQTT:0] online
    PM2 | 2025-02-06T11:12:02: PM2 log: App [Lox2MQTT:0] exited with code [1] via signal [SIGINT]
    PM2 | 2025-02-06T11:26:46: PM2 log: [Watch] Stop watching Lox2MQTT
    PM2 | 2025-02-06T11:26:46: PM2 log: App [Lox2MQTT:0] starting in -fork mode-
    PM2 | 2025-02-06T11:26:46: PM2 log: App [Lox2MQTT:0] online
    PM2 | 2025-02-06T11:26:47: PM2 log: App [Lox2MQTT:0] exited with code [1] via signal [SIGINT]
    /opt/loxberry/bin/plugins/lox2mqtt/.pm2/logs/Lox2MQTT-out.log last 15 lines:
    /opt/loxberry/bin/plugins/lox2mqtt/.pm2/logs/Lox2MQTT-error.log last 15 lines:
    0|Lox2MQTT | 2025-02-06T11:26:47: Require stack:
    0|Lox2MQTT | 2025-02-06T11:26:47: - /opt/loxberry/bin/plugins/lox2mqtt/lox2mqtt.js
    0|Lox2MQTT | 2025-02-06T11:26:47: at Function._resolveFilename (node:internal/modules/cjs/loader:1394:15)
    0|Lox2MQTT | 2025-02-06T11:26:47: at Hook._require.Module.require (/usr/local/lib/node_modules/pm2/node_modules/require-in-the-middle/index.js:81:25)
    0|Lox2MQTT | 2025-02-06T11:26:47: at require (node:internal/modules/helpers:135:16)
    0|Lox2MQTT | 2025-02-06T11:26:47: at Object.<anonymous> (/opt/loxberry/bin/plugins/lox2mqtt/lox2mqtt.js:4:16)
    0|Lox2MQTT | 2025-02-06T11:26:47: at Module._compile (node:internal/modules/cjs/loader:1723:14)
    0|Lox2MQTT | 2025-02-06T11:26:47: at Object..js (node:internal/modules/cjs/loader:1888:10)
    0|Lox2MQTT | 2025-02-06T11:26:47: at Module.load (node:internal/modules/cjs/loader:1458:32)
    0|Lox2MQTT | 2025-02-06T11:26:47: at Function._load (node:internal/modules/cjs/loader:1275:12)
    0|Lox2MQTT | 2025-02-06T11:26:47: at Object.<anonymous> (/usr/local/lib/node_modules/pm2/lib/ProcessContainerFork.js:33:23)
    0|Lox2MQTT | 2025-02-06T11:26:47: at Module._compile (node:internal/modules/cjs/loader:1723:14) {
    0|Lox2MQTT | 2025-02-06T11:26:47: code: 'MODULE_NOT_FOUND',
    0|Lox2MQTT | 2025-02-06T11:26:47: requireStack: [ '/opt/loxberry/bin/plugins/lox2mqtt/lox2mqtt.js' ]
    0|Lox2MQTT | 2025-02-06T11:26:47: }
    And when I want to install the dependencies manual new with npm install, then I get


    Code:
    loxberry@loxberry:~/bin/plugins/lox2mqtt $ npm install
    npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
    npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
    npm error code 1
    npm error path /opt/loxberry/bin/plugins/lox2mqtt/node_modules/better-sqlite3
    npm error command failed
    npm error command sh -c prebuild-install || node-gyp rebuild --release
    npm error make: Entering directory '/opt/loxberry/bin/plugins/lox2mqtt/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: Leaving directory '/opt/loxberry/bin/plugins/lox2mqtt/node_modules/better-sqlite3/build'
    npm error prebuild-install warn install No prebuilt binaries found (target=23.7.0 runtime=node arch=arm64 libc= platform=linux)
    npm error gyp info it worked if it ends with ok
    npm error gyp info using node-gyp@11.0.0
    npm error gyp info using node@23.7.0 | linux | arm64
    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 '/opt/loxberry/bin/plugins/lox2mqtt/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 '/opt/loxberry/.cache/node-gyp/23.7.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=/opt/loxberry/.cache/node-gyp/23.7.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=/opt/loxberry/.cache/node-gyp/23.7.0/<(target_arch)/node.lib',
    npm error gyp info spawn args '-Dmodule_root_dir=/opt/loxberry/bin/plugins/lox2mqtt/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 /opt/loxberry/.cache/node-gyp/23.7.0/include/node/cppgc/common.h:8,
    npm error from /opt/loxberry/.cache/node-gyp/23.7.0/include/node/v8.h:23,
    npm error from /opt/loxberry/.cache/node-gyp/23.7.0/include/node/node.h:73,
    npm error from ./src/better_sqlite3.lzz:11,
    npm error from ../src/better_sqlite3.cpp:4:
    npm error /opt/loxberry/.cache/node-gyp/23.7.0/include/node/v8config.h:13:2: error: #error "C++20 or later required."
    npm error 13 | #error "C++20 or later required."
    npm error | ^~~~~
    npm error ./src/util/macros.lzz:31:69: error: ‘CopyablePersistentTraits’ is not a member of ‘v8’; did you mean ‘NonCopyablePersistentTraits’?
    npm error ./src/util/macros.lzz:31:94: error: template argument 2 is invalid
    npm error ./src/util/macros.lzz:33:97: error: ‘CopyablePersistent’ has not been declared
    npm error ./src/util/macros.lzz:33:116: error: expected ‘,’ or ‘...’ before ‘<’ token
    npm error ./src/util/macros.lzz:142:138: error: ‘v8::AccessorGetterCallback’ has not been declared
    npm error ./src/util/constants.lzz:119:3: error: ‘CopyablePersistent’ does not name a type
    npm error ./src/util/constants.lzz:120:3: error: ‘CopyablePersistent’ does not name a type
    npm error ./src/util/constants.lzz:121:3: error: ‘CopyablePersistent’ does not name a type
    npm error ./src/util/constants.lzz:122:3: error: ‘CopyablePersistent’ does not name a type
    npm error ./src/util/constants.lzz:123:3: error: ‘CopyablePersistent’ does not name a type
    npm error ./src/util/constants.lzz:124:3: error: ‘CopyablePersistent’ does not name a type
    npm error ./src/util/constants.lzz:125:3: error: ‘CopyablePersistent’ does not name a type
    npm error ./src/util/constants.lzz:126:3: error: ‘CopyablePersistent’ does not name a type
    npm error ./src/util/constants.lzz:127:3: error: ‘CopyablePersistent’ does not name a type
    npm error ./src/util/constants.lzz:128:3: error: ‘CopyablePersistent’ does not name a type
    npm error ./src/util/constants.lzz:129:3: error: ‘CopyablePersistent’ does not name a type
    npm error ./src/util/constants.lzz:130:3: error: ‘CopyablePersistent’ does not name a type
    npm error ./src/util/constants.lzz:131:3: error: ‘CopyablePersistent’ does not name a type
    npm error ./src/util/constants.lzz:132:3: error: ‘CopyablePersistent’ does not name a type
    npm error ./src/util/constants.lzz:133:3: error: ‘CopyablePersistent’ does not name a type
    npm error ./src/util/constants.lzz:134:3: error: ‘CopyablePersistent’ does not name a type
    npm error ./src/util/constants.lzz:135:3: error: ‘CopyablePersistent’ does not name a type
    npm error ./src/util/constants.lzz:136:3: error: ‘CopyablePersistent’ does not name a type
    npm error ./src/util/constants.lzz:140:49: error: ‘CopyablePersistent’ has not been declared
    npm error ./src/util/constants.lzz:140:68: error: expected ‘,’ or ‘...’ before ‘<’ token
    npm error ./src/util/constants.lzz:150:28: error: ‘CopyablePersistent’ was not declared in this scope
    npm error ./src/util/constants.lzz:150:57: error: template argument 2 is invalid
    npm error ./src/util/constants.lzz:150:57: error: template argument 5 is invalid
    npm error ./src/util/constants.lzz:150:59: error: expected unqualified-id before ‘>’ token
    npm error ./src/util/bind-map.lzz:25:5: error: ‘CopyablePersistent’ does not name a type
    npm error ./src/objects/database.lzz:465:3: error: ‘CopyablePersistent’ does not name a type
    npm error ./src/util/custom-function.lzz:57:3: error: ‘CopyablePersistent’ does not name a type
    npm error ./src/util/custom-aggregate.lzz:39:90: error: ‘CopyablePersistent’ has not been declared
    npm error ./src/util/custom-aggregate.lzz:39:109: error: expected ‘,’ or ‘...’ before ‘<’ token
    npm error ./src/util/custom-aggregate.lzz:83:5: error: ‘CopyablePersistent’ does not name a type
    npm error ./src/util/custom-aggregate.lzz:118:3: error: ‘CopyablePersistent’ does not name a type
    npm error ./src/util/custom-aggregate.lzz:119:3: error: ‘CopyablePersistent’ does not name a type
    npm error ./src/util/custom-aggregate.lzz:120:3: error: ‘CopyablePersistent’ does not name a type
    npm error ./src/util/custom-table.lzz:104:5: error: ‘CopyablePersistent’ does not name a type
    npm error ./src/util/custom-table.lzz:123:5: error: ‘CopyablePersistent’ does not name a type
    npm error ./src/util/custom-table.lzz:124:5: error: ‘CopyablePersistent’ does not name a type
    npm error ./src/util/custom-table.lzz:125:5: error: ‘CopyablePersistent’ does not name a type
    npm error ./src/util/custom-table.lzz:403:3: error: ‘CopyablePersistent’ does not name a type
    npm error ./src/better_sqlite3.lzz:56:3: error: ‘CopyablePersistent’ does not name a type
    npm error ./src/better_sqlite3.lzz:57:3: error: ‘CopyablePersistent’ does not name a type
    npm error ./src/better_sqlite3.lzz:58:3: error: ‘CopyablePersistent’ does not name a type
    npm error ./src/better_sqlite3.lzz:59:3: error: ‘CopyablePersistent’ does not name a type
    npm error ./src/util/macros.lzz:33:108: error: ‘CopyablePersistent’ has not been declared
    npm error ./src/util/macros.lzz:33:127: error: expected ‘,’ or ‘...’ before ‘<’ token
    npm error ./src/util/macros.lzz: In function ‘void SetFrozen(v8::Isolate*, v8::Local<v8::Context>, v8::Local<v8::Object>, int)’:
    npm error ./src/util/macros.lzz:34:37: error: ‘key’ was not declared in this scope; did you mean ‘key_t’?
    npm error ./src/util/macros.lzz:34:55: error: ‘value’ was not declared in this scope
    npm error ./src/util/bind-map.lzz: In member function ‘v8::Local<v8::String> BindMap::Pair::GetName(v8::Isolate*)’:
    npm error ./src/util/bind-map.lzz:14:40: error: ‘name’ was not declared in this scope; did you mean ‘tzname’?
    npm error ./src/objects/statement-iterator.lzz: In static member function ‘static v8::Local<v8::Object> StatementIterator::NewRecord(v8::Isolate*, v8::Local<v8::Context>, v8::Local<v8::Value>, Addon*, bool)’:
    npm error ./src/objects/statement-iterator.lzz:121:44: error: ‘class CS’ has no member named ‘value’
    npm error ./src/objects/statement-iterator.lzz:122:44: error: ‘class CS’ has no member named ‘done’
    npm error ./src/util/custom-aggregate.lzz: At global scope:
    npm error ./src/util/custom-aggregate.lzz:39:109: error: ‘CopyablePersistent’ has not been declared
    npm error ./src/util/custom-aggregate.lzz:39:128: error: expected ‘,’ or ‘...’ before ‘<’ token
    npm error ./src/util/custom-aggregate.lzz: In static member function ‘static void CustomAggregate::xStepBase(sqlite3_context*, int, sqlite3_value**, int)’:
    npm error ./src/util/custom-aggregate.lzz:40:269: error: ‘struct CustomAggregate::Accumulator’ has no member named ‘value’
    npm error ./src/util/custom-aggregate.lzz:44:32: error: ‘struct CustomAggregate::Accumulator’ has no member named ‘value’
    npm error ./src/util/custom-aggregate.lzz:47:70: error: ‘ptrtm’ was not declared in this scope
    npm error ./src/util/custom-aggregate.lzz:54:63: error: ‘struct CustomAggregate::Accumulator’ has no member named ‘value’
    npm error ./src/util/custom-aggregate.lzz: In static member function ‘static void CustomAggregate::xValueBase(sqlite3_context*, bool)’:
    npm error ./src/util/custom-aggregate.lzz:59:269: error: ‘struct CustomAggregate::Accumulator’ has no member named ‘value’
    npm error ./src/util/custom-aggregate.lzz:68:52: error: ‘struct CustomAggregate::Accumulator’ has no member named ‘value’
    npm error ./src/util/custom-aggregate.lzz:70:71: error: ‘class CustomAggregate’ has no member named ‘result’
    npm error ./src/better_sqlite3.lzz: At global scope:
    npm error /opt/loxberry/.cache/node-gyp/23.7.0/include/node/node.h:1246: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::Obje
    ct>, v8::Local<v8::Value>, v8::Local<v8::Context>, void*)’} [-Wcast-function-type]
    npm error 1246 | (node::addon_context_register_func) (regfunc), \
    npm error | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    npm error /opt/loxberry/.cache/node-gyp/23.7.0/include/node/node.h:1264:3: note: in expansion of macro ‘NODE_MODULE_CONTEXT_AWARE_X’
    npm error 1264 | NODE_MODULE_CONTEXT_AWARE_X(modname, regfunc, NULL, 0)
    npm error | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
    npm error /opt/loxberry/.cache/node-gyp/23.7.0/include/node/node.h:1295:3: note: in expansion of macro ‘NODE_MODULE_CONTEXT_AWARE’
    npm error 1295 | 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/better_sqlite3.lzz: In function ‘void node_register_module_v131(v8::Local<v8::Object>, v8::Local<v8::Value>, v8::Local<v8::Context>)’:
    npm error ./src/better_sqlite3.lzz:84:9: error: ‘struct Addon’ has no member named ‘Statement’
    npm error ./src/better_sqlite3.lzz:85:9: error: ‘struct Addon’ has no member named ‘StatementIterator’
    npm error ./src/better_sqlite3.lzz:86:9: error: ‘struct Addon’ has no member named ‘Backup’
    npm error ./src/util/macros.lzz: At global scope:
    npm error ./src/util/macros.lzz:142:138: error: ‘v8::AccessorGetterCallback’ has not been declared
    npm error ./src/util/macros.lzz: In function ‘void SetPrototypeGetter(v8::Isolate*, v8::Local<v8::External>, v8::Local<v8::FunctionTemplate>, const char*, int)’:
    npm error ./src/util/macros.lzz:150:35: error: ‘class v8::ObjectTemplate’ has no member named ‘SetAccessor’
    npm error ./src/util/constants.lzz: In member function ‘v8::Local<v8::String> CS::Code(v8::Isolate*, int)’:
    npm error ./src/util/constants.lzz:5:32: error: ‘codes’ was not declared in this scope; did you mean ‘code’?
    npm error ./src/util/constants.lzz: In constructor ‘CS::CS(v8::Isolate*)’:
    npm error ./src/util/constants.lzz:11:36: error: ‘database’ was not declared in this scope; did you mean ‘Database’?
    npm error ./src/util/constants.lzz:12:36: error: ‘reader’ was not declared in this scope; did you mean ‘read’?
    npm error ./src/util/constants.lzz:13:36: error: ‘source’ was not declared in this scope
    npm error ./src/util/constants.lzz:14:36: error: ‘memory’ was not declared in this scope; did you mean ‘memcpy’?
    npm error ./src/util/constants.lzz:15:36: error: ‘readonly’ was not declared in this scope
    npm error ./src/util/constants.lzz:16:36: error: ‘name’ was not declared in this scope; did you mean ‘tzname’?
    npm error ./src/util/constants.lzz:17:36: error: ‘next’ was not declared in this scope; did you mean ‘std::next’?
    npm error In file included from /usr/include/c++/12/string:46,
    npm error from ./src/better_sqlite3.lzz:5:
    npm error /usr/include/c++/12/bits/stl_iterator_base_funcs.h:230:5: note: ‘std::next’ declared here
    npm error 230 | next(_InputIterator __x, typename
    npm error | ^~~~
    npm error ./src/util/constants.lzz:18:36: error: ‘length’ was not declared in this scope
    npm error ./src/util/constants.lzz:19:36: error: ‘done’ was not declared in this scope
    npm error ./src/util/constants.lzz:20:36: error: ‘value’ was not declared in this scope
    npm error ./src/util/constants.lzz:21:36: error: ‘changes’ was not declared in this scope
    npm error ./src/util/constants.lzz:22:36: error: ‘lastInsertRowid’ was not declared in this scope
    npm error ./src/util/constants.lzz:23:36: error: ‘statement’ was not declared in this scope; did you mean ‘Statement’?
    npm error ./src/util/constants.lzz:24:36: error: ‘column’ was not declared in this scope
    npm error ./src/util/constants.lzz:25:36: error: ‘table’ was not declared in this scope
    npm error ./src/util/constants.lzz:26:36: error: ‘type’ was not declared in this scope; did you mean ‘wctype’?
    npm error ./src/util/constants.lzz:27:36: error: ‘totalPages’ was not declared in this scope
    npm error ./src/util/constants.lzz:28:36: error: ‘remainingPages’ was not declared in this scope
    npm error ./src/util/constants.lzz: At global scope:
    npm error ./src/util/constants.lzz:140:44: error: ‘CopyablePersistent’ has not been declared
    npm error ./src/util/constants.lzz:140:63: error: expected ‘,’ or ‘...’ before ‘<’ token
    npm error ./src/util/constants.lzz: In static member function ‘static void CS::SetString(v8::Isolate*, int)’:
    npm error ./src/util/constants.lzz:141:17: error: ‘constant’ was not declared in this scope; did you mean ‘const’?
    npm error ./src/util/constants.lzz:141:73: error: ‘str’ was not declared in this scope; did you mean ‘std’?
    npm error ./src/util/constants.lzz: In member function ‘void CS::SetCode(v8::Isolate*, int, const char*)’:
    npm error ./src/util/constants.lzz:145:17: error: ‘codes’ was not declared in this scope; did you mean ‘code’?
    npm error ./src/util/bind-map.lzz: In constructor ‘BindMap::Pair::Pair(v8::Isolate*, const char*, int)’:
    npm error ./src/util/bind-map.lzz:20:5: error: class ‘BindMap::Pair’ does not have any field named ‘name’
    npm error ./src/util/bind-map.lzz: In constructor ‘BindMap::Pair::Pair(v8::Isolate*, BindMap::Pair*)’:
    npm error ./src/util/bind-map.lzz:23:5: error: class ‘BindMap::Pair’ does not have any field named ‘name’
    npm error ./src/util/bind-map.lzz:23:26: error: ‘class BindMap::Pair’ has no member named ‘name’
    npm error ./src/objects/database.lzz: In static member function ‘static v8::Local<v8::Function> Database::Init(v8::Isolate*, v8::Local<v8::External>)’:
    npm error ./src/objects/database.lzz:17:35: error: invalid conversion from ‘void (*)(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>&)’ to ‘int’ [-fpermissive]
    npm error ./src/util/macros.lzz:142:165: note: initializing argument 5 of ‘void SetPrototypeGetter(v8::Isolate*, v8::Local<v8::External>, v8::Local<v8::FunctionTemplate>, const char*, int)’
    npm error ./src/objects/database.lzz:18:35: error: invalid conversion from ‘void (*)(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>&)’ to ‘int’ [-fpermissive]
    npm error ./src/util/macros.lzz:142:165: note: initializing argument 5 of ‘void SetPrototypeGetter(v8::Isolate*, v8::Local<v8::External>, v8::Local<v8::FunctionTemplate>, const char*, int)’
    npm error ./src/objects/database.lzz: In static member function ‘static void Database::ThrowSqliteError(Addon*, const char*, int)’:
    npm error ./src/objects/database.lzz:58:48: error: ‘struct Addon’ has no member named ‘SqliteError’
    npm error ./src/objects/database.lzz: In member function ‘bool Database::Log(v8::Isolate*, sqlite3_stmt*)’:
    npm error ./src/objects/database.lzz:69:32: error: ‘logger’ was not declared in this scope
    npm error ./src/objects/database.lzz:69:67: error: expected primary-expression before ‘>’ token
    npm error ./src/objects/database.lzz:69:69: error: expected primary-expression before ‘)’ token
    npm error ./src/objects/database.lzz: In constructor ‘Database::Database(v8::Isolate*, Addon*, sqlite3*, v8::Local<v8::Value>)’:
    npm error ./src/objects/database.lzz:131:203: error: class ‘Database’ does not have any field named ‘logger’
    npm error ./src/objects/database.lzz: In static member function ‘static void Database::JS_new(const v8::FunctionCallbackInfo<v8::Value>&)’:
    npm error ./src/objects/database.lzz:194:64: error: ‘class CS’ has no member named ‘memory’
    npm error ./src/objects/database.lzz:195:64: error: ‘class CS’ has no member named ‘readonly’
    npm error ./src/objects/database.lzz:196:64: error: ‘class CS’ has no member named ‘name’
    npm error ./src/objects/database.lzz: In static member function ‘static void Database::JS_prepare(const v8::FunctionCallbackInfo<v8::Value>&)’:
    npm error ./src/objects/database.lzz:210:52: error: ‘struct Addon’ has no member named ‘Statement’
    npm error ./src/objects/database.lzz: In static member function ‘static void Database::JS_backup(const v8::FunctionCallbackInfo<v8::Value>&)’:
    npm error ./src/objects/database.lzz:268:52: error: ‘struct Addon’ has no member named ‘Backup’
    npm error ./src/objects/statement.lzz: In static member function ‘static v8::Local<v8::Function> Statement::Init(v8::Isolate*, v8::Local<v8::External>)’:
    npm error ./src/objects/statement.lzz:16:35: error: invalid conversion from ‘void (*)(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>&)’ to ‘int’ [-fpermissive]
    npm error ./src/util/macros.lzz:142:165: note: initializing argument 5 of ‘void SetPrototypeGetter(v8::Isolate*, v8::Local<v8::External>, v8::Local<v8::FunctionTemplate>, const char*, int)’
    npm error ./src/objects/statement.lzz: In static member function ‘static void Statement::JS_new(const v8::FunctionCallbackInfo<v8::Value>&)’:
    npm error ./src/objects/statement.lzz:148:64: error: ‘class CS’ has no member named ‘reader’
    npm error ./src/objects/statement.lzz:149:64: error: ‘class CS’ has no member named ‘readonly’
    npm error ./src/objects/statement.lzz:150:64: error: ‘class CS’ has no member named ‘source’
    npm error ./src/objects/statement.lzz:151:64: error: ‘class CS’ has no member named ‘database’
    npm error ./src/objects/statement.lzz: In static member function ‘static void Statement::JS_run(const v8::FunctionCallbackInfo<v8::Value>&)’:
    npm error ./src/objects/statement.lzz:168:52: error: ‘class CS’ has no member named ‘changes’
    npm error ./src/objects/statement.lzz:169:52: error: ‘class CS’ has no member named ‘lastInsertRowid’
    npm error ./src/objects/statement.lzz: In static member function ‘static void Statement::JS_iterate(const v8::FunctionCallbackInfo<v8::Value>&)’:
    npm error ./src/objects/statement.lzz:218:52: error: ‘struct Addon’ has no member named ‘StatementIterator’
    npm error ./src/objects/statement.lzz: In static member function ‘static void Statement::JS_columns(const v8::FunctionCallbackInfo<v8::Value>&)’:
    npm error ./src/objects/statement.lzz:290:56: error: ‘class CS’ has no member named ‘name’
    npm error ./src/objects/statement.lzz:291:62: error: ‘class CS’ has no member named ‘column’
    npm error ./src/objects/statement.lzz:292:61: error: ‘class CS’ has no member named ‘table’
    npm error ./src/objects/statement.lzz:293:64: error: ‘class CS’ has no member named ‘database’
    npm error ./src/objects/statement.lzz:294:60: error: ‘class CS’ has no member named ‘type’
    npm error ./src/objects/statement-iterator.lzz: In static member function ‘static void StatementIterator::JS_new(const v8::FunctionCallbackInfo<v8::Value>&)’:
    npm error ./src/objects/statement-iterator.lzz:52:64: error: ‘class CS’ has no member named ‘statement’
    npm error ./src/objects/backup.lzz: In static member function ‘static void Backup::JS_new(const v8::FunctionCallbackInfo<v8::Value>&)’:
    npm error ./src/objects/backup.lzz:93:94: error: ‘class CS’ has no member named ‘database’
    npm error ./src/objects/backup.lzz: In static member function ‘static void Backup::JS_transfer(const v8::FunctionCallbackInfo<v8::Value>&)’:
    npm error ./src/objects/backup.lzz:115:52: error: ‘class CS’ has no member named ‘totalPages’
    npm error ./src/objects/backup.lzz:116:52: error: ‘class CS’ has no member named ‘remainingPages’
    npm error ./src/util/custom-function.lzz: In constructor ‘CustomFunction::CustomFunction(v8::Isolate*, Database*, const char*, v8::Local<v8::Function>, bool)’:
    npm error ./src/util/custom-function.lzz:10:46: error: class ‘CustomFunction’ does not have any field named ‘fn’
    npm error ./src/util/custom-function.lzz: In static member function ‘static void CustomFunction::xFunc(sqlite3_context*, int, sqlite3_value**)’:
    npm error ./src/util/custom-function.lzz:33:68: error: ‘class CustomFunction’ has no member named ‘fn’
    npm error ./src/util/custom-aggregate.lzz: In constructor ‘CustomAggregate::CustomAggregate(v8::Isolate*, Database*, const char*, v8::Local<v8::Value>, v8::Local<v8::Function>, v8::Local<v8::Value>, v8::Local<v8::Value>, bool)’:
    npm error ./src/util/custom-aggregate.lzz:13:132: error: class ‘CustomAggregate’ does not have any field named ‘inverse’
    npm error ./src/util/custom-aggregate.lzz:13:231: error: class ‘CustomAggregate’ does not have any field named ‘result’
    npm error ./src/util/custom-aggregate.lzz:13:327: error: class ‘CustomAggregate’ does not have any field named ‘start’
    npm error ./src/util/custom-aggregate.lzz: In static member function ‘static void CustomAggregate::xStep(sqlite3_context*, int, sqlite3_value**)’:
    npm error ./src/util/custom-aggregate.lzz:22:69: error: ‘fn’ is not a member of ‘CustomAggregate’
    npm error ./src/util/custom-aggregate.lzz: In static member function ‘static void CustomAggregate::xInverse(sqlite3_context*, int, sqlite3_value**)’:
    npm error ./src/util/custom-aggregate.lzz:26:69: error: ‘inverse’ is not a member of ‘CustomAggregate’
    npm error ./src/util/custom-aggregate.lzz: In member function ‘CustomAggregate::Accumulator* CustomAggregate::GetAccumulator(sqlite3_context*)’:
    npm error ./src/util/custom-aggregate.lzz:94:71: error: ‘start’ was not declared in this scope
    npm error ./src/util/custom-aggregate.lzz:94:105: error: expected primary-expression before ‘>’ token
    npm error ./src/util/custom-aggregate.lzz:94:107: error: expected primary-expression before ‘)’ token
    npm error ./src/util/custom-aggregate.lzz:96:43: error: ‘struct CustomAggregate::Accumulator’ has no member named ‘value’
    npm error ./src/util/custom-aggregate.lzz:99:38: error: ‘struct CustomAggregate::Accumulator’ has no member named ‘value’
    npm error ./src/util/custom-aggregate.lzz:99:59: error: ‘start’ was not declared in this scope
    npm error ./src/util/custom-aggregate.lzz: In static member function ‘static void CustomAggregate::DestroyAccumulator(sqlite3_context*)’:
    npm error ./src/util/custom-aggregate.lzz:108:22: error: ‘struct CustomAggregate::Accumulator’ has no member named ‘value’
    npm error ./src/util/custom-table.lzz: In constructor ‘CustomTable::CustomTable(v8::Isolate*, Database*, const char*, v8::Local<v8::Function>)’:
    npm error ./src/util/custom-table.lzz:9:70: error: class ‘CustomTable’ does not have any field named ‘factory’
    npm error ./src/util/custom-table.lzz: In constructor ‘CustomTable::VTab::VTab(CustomTable*, v8::Local<v8::Function>, std::vector<std::__cxx11::basic_string<char> >, bool)’:
    npm error ./src/util/custom-table.lzz:83:87: error: class ‘CustomTable::VTab’ does not have any field named ‘generator’
    npm error ./src/util/custom-table.lzz: In static member function ‘static int CustomTable::xConnect(sqlite3*, void*, int, const char* const*, sqlite3_vtab**, char**)’:
    npm error ./src/util/custom-table.lzz:168:68: error: ‘class CustomTable’ has no member named ‘factory’
    npm error ./src/util/custom-table.lzz: In static member function ‘static int CustomTable::xFilter(sqlite3_vtab_cursor*, int, const char*, int, sqlite3_value**)’:
    npm error ./src/util/custom-table.lzz:263:65: error: ‘class CustomTable::VTab’ has no member named ‘generator’
    npm error ./src/util/custom-table.lzz:273:77: error: ‘class CS’ has no member named ‘next’
    npm error ./src/util/custom-table.lzz:273:128: error: expected primary-expression before ‘>’ token
    npm error ./src/util/custom-table.lzz:273:130: error: expected primary-expression before ‘)’ token
    npm error ./src/util/custom-table.lzz:274:25: error: ‘class CustomTable::Cursor’ has no member named ‘iterator’
    npm error ./src/util/custom-table.lzz:275:25: error: ‘class CustomTable::Cursor’ has no member named ‘next’
    npm error ./src/util/custom-table.lzz: In static member function ‘static int CustomTable::xNext(sqlite3_vtab_cursor*)’:
    npm error ./src/util/custom-table.lzz:292:58: error: ‘class CustomTable::Cursor’ has no member named ‘iterator’
    npm error ./src/util/custom-table.lzz:293:56: error: ‘class CustomTable::Cursor’ has no member named ‘next’
    npm error ./src/util/custom-table.lzz:302:56: error: ‘class CS’ has no member named ‘done’
    npm error ./src/util/custom-table.lzz:302:106: error: expected primary-expression before ‘>’ token
    npm error ./src/util/custom-table.lzz:302:108: error: expected primary-expression before ‘)’ token
    npm error ./src/util/custom-table.lzz:304:33: error: ‘class CustomTable::Cursor’ has no member named ‘row’; did you mean ‘rowid’?
    npm error ./src/util/custom-table.lzz:304:79: error: ‘class CS’ has no member named ‘value’
    npm error ./src/util/custom-table.lzz:304:128: error: expected primary-expression before ‘>’ token
    npm error ./src/util/custom-table.lzz:304:130: error: expected primary-expression before ‘)’ token
    npm error ./src/util/custom-table.lzz: In static member function ‘static int CustomTable::xColumn(sqlite3_vtab_cursor*, sqlite3_context*, int)’:
    npm error ./src/util/custom-table.lzz:325:52: error: ‘class CustomTable::Cursor’ has no member named ‘row’; did you mean ‘rowid’?
    npm error ./src/better_sqlite3.lzz: In static member function ‘static void Addon::JS_setErrorConstructor(const v8::FunctionCallbackInfo<v8::Value>&)’:
    npm error ./src/better_sqlite3.lzz:37:104: error: ‘struct Addon’ has no member named ‘SqliteError’
    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] Error 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:216:23)
    npm error gyp ERR! System Linux 6.1.21-v8+
    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 /opt/loxberry/bin/plugins/lox2mqtt/node_modules/better-sqlite3
    npm error gyp ERR! node -v v23.7.0
    npm error gyp ERR! node-gyp -v v11.0.0
    npm error gyp ERR! not ok
    npm error A complete log of this run can be found in: /opt/loxberry/.npm/_logs/2025-02-06T10_06_00_036Z-debug-0.log

    My Setup:
    Code:
    Computer: Raspberry PI 4

    Do you need more information?

    Best regards
    Gabriel R.


    Edit (a few minutes later):
    When I try to run "node lox2mqtt.js", I get this output
    It seems that the "loxberry-logger" module is missing.​

    Code:
    loxberry@loxberry:~/bin/plugins/lox2mqtt $ node lox2mqtt.js
    node:internal/modules/cjs/loader:1397
    throw err;
    ^
    Error: Cannot find module 'loxberry-logger'
    Require stack:
    - /opt/loxberry/bin/plugins/lox2mqtt/lox2mqtt.js
    at Function._resolveFilename (node:internal/modules/cjs/loader:1394:15)
    at defaultResolveImpl (node:internal/modules/cjs/loader:1050:19)
    at resolveForCJSWithHooks (node:internal/modules/cjs/loader:1055:22)
    at Function._load (node:internal/modules/cjs/loader:1204:37)
    at TracingChannel.traceSync (node:diagnostics_channel:322:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:234:24)
    at Module.require (node:internal/modules/cjs/loader:1480:12)
    at require (node:internal/modules/helpers:135:16)
    at Object.<anonymous> (/opt/loxberry/bin/plugins/lox2mqtt/lox2mqtt.js:4:16)
    at Module._compile (node:internal/modules/cjs/loader:1723:14) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [ '/opt/loxberry/bin/plugins/lox2mqtt/lox2mqtt.js' ]
    }
    Node.js v23.7.0

    ​​
    Zuletzt geändert von Gabriel R.; In den letzten 2 Wochen.

    Kommentar

    • nufke
      Smart Home'r
      • 10.11.2018
      • 60

      #62
      Based on the log, I see an error related to the compilation of the node-gyp package, which is used by the better-sqlite3 package, which is again used in the loxberry-logger. It seems your build flow does not support C++20.

      Can you share some more info
      - which OS and version is running on your Pi4 (uname -ra)
      - which gcc version is installed (g++ -v)

      Some things we can try:
      - increase the version of gcc/g++ such that it supports C++20
      - use a newer distribution on you Pi4 (which also ships with a newer C++ compiler)
      - remove the dependency to node-gyp in the loxberry-logger, but this requires changing the package better-sqlite3 to something else

      Kommentar

      • Gabriel R.
        Azubi
        • In den letzten 2 Wochen
        • 2

        #63
        I'm sorry for the delay in replying, I wasn't in my office and couldn't reach the Raspberry PI.
        Anyway, thanks for the really quick reply, I just ran the two commands and these are the outputs.


        Code:
        loxberry@loxberry:~ $ uname -ra
        
        Linux loxberry 6.1.21-v8+ [NODE="1642"]Energiezähler[/NODE] SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux

        Code:
        loxberry@loxberry:~ $ g++ -v
        
        Using built-in specs.
        COLLECT_GCC=g++
        COLLECT_LTO_WRAPPER=/usr/lib/gcc/aarch64-linux-gnu/12/lto-wrapper
        Target: aarch64-linux-gnu
        Configured with: ../src/configure -v --with-pkgversion='Debian 12.2.0-14' --with-bugurl=file:///usr/share/doc/gcc-12/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-12 --program-prefix=aarch64-linux
        -gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-objec
        t --disable-libquadmath --disable-libquadmath-support --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --enable-fix-cortex-a53-843419 --disable-werror --enable-checkin
        g=release --build=aarch64-linux-gnu --host=aarch64-linux-gnu --target=aarch64-linux-gnu
        Thread model: posix
        Supported LTO compression algorithms: zlib zstd
        gcc version 12.2.0 (Debian 12.2.0-14)
        I'll try out your suggestions, if it works I'll let you know.



        Edit (a hour later):
        The raspberry has already the correct gcc/g++ version to compile c++20 code, and I updated the system (there was a new update to DietPi v9.10.0), but still its "Lox2MQTT not running", so I tried to use a hyperv-vm and still exact the same issue.
        Zuletzt geändert von Gabriel R.; vor einer Woche.

        Kommentar

        • nufke
          Smart Home'r
          • 10.11.2018
          • 60

          #64
          thanks for sharing the versions, which look OK. I need to study a bit what is causing this issue, probably I need to create a VM with the same DietPi version. Did you use the recommended DietPi image and LoxBerry installer or is there something special in your install?

          Kommentar


          • Gabriel R.
            Gabriel R. kommentierte
            Kommentar bearbeiten
            I did everything as described in the Loxberry instructions and nothing else and downloaded the image from the dietpi website.
        • nufke
          Smart Home'r
          • 10.11.2018
          • 60

          #65
          Latest version v0.8.1. should resolve some install and build errors when using newer nodejs versions. Please check if this works for you.

          Kommentar


          • Gabriel R.
            Gabriel R. kommentierte
            Kommentar bearbeiten
            Good morning,
            yes, the version 0.8.1 works perfectly for me, on the Raspberry and on the VM, thank you very much for your quick help.

            have a nice week
            Gabriel R.
        Lädt...