ioBroker/ioBroker.history

history2db.js broken after js-controller update to 5.0.5

jardleex opened this issue · 0 comments

Describe the bug
Im Zuge der Umstellung von history auf influxdb wollte ich history2db.js verwenden um bestehende history-Daten zu übernehmen.
Heute habe ich meine js-controller auf Version 5.0.5 aktualisiert wonach history2db.js nicht mehr funktionierte.

To Reproduce
Im Docker-Container:

root@iobroker:/opt/iobroker# cd /opt/iobroker/node_modules/iobroker.history/converter
root@iobroker:/opt/iobroker/node_modules/iobroker.history/converter# node history2db.js 
node:internal/modules/cjs/loader:1078
  throw err;
  ^

Error: Cannot find module '/opt/iobroker/node_modules/iobroker.js-controller/lib/tools'
Require stack:
- /opt/iobroker/node_modules/iobroker.history/converter/history2db.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1075:15)
    at Module._load (node:internal/modules/cjs/loader:920:27)
    at Module.require (node:internal/modules/cjs/loader:1141:19)
    at require (node:internal/modules/cjs/helpers:110:18)
    at Object.<anonymous> (/opt/iobroker/node_modules/iobroker.history/converter/history2db.js:11:60)
    at Module._compile (node:internal/modules/cjs/loader:1254:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
    at Module.load (node:internal/modules/cjs/loader:1117:32)
    at Module._load (node:internal/modules/cjs/loader:958:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/opt/iobroker/node_modules/iobroker.history/converter/history2db.js'
  ]
}

Node.js v18.16.0

## alternativ
# node history2db.js influxdb.0 info 0 /opt/iobroker/iobroker-data/history --processAllDPs --simulate
node:internal/modules/cjs/loader:1078
  throw err;
  ^

Error: Cannot find module '/opt/iobroker/node_modules/iobroker.js-controller/lib/tools'
Require stack:
- /opt/iobroker/node_modules/iobroker.history/converter/history2db.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1075:15)
    at Module._load (node:internal/modules/cjs/loader:920:27)
    at Module.require (node:internal/modules/cjs/loader:1141:19)
    at require (node:internal/modules/cjs/helpers:110:18)
    at Object.<anonymous> (/opt/iobroker/node_modules/iobroker.history/converter/history2db.js:11:60)
    at Module._compile (node:internal/modules/cjs/loader:1254:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
    at Module.load (node:internal/modules/cjs/loader:1117:32)
    at Module._load (node:internal/modules/cjs/loader:958:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/opt/iobroker/node_modules/iobroker.history/converter/history2db.js'
  ]
}

Node.js v18.16.0

Expected behavior
Ich kann via history2db.js meine history-Daten nach influxdb übertragen.

Screenshots & Logfiles
none

Versions:

  • Adapter version: v2.2.4
  • JS-Controller version: 5.0.5
  • Node version: v18.16.0
  • Operating system: Docker Containter buanet/iobroker auf Debian 10 via Portainer

Additional context
Anscheinend wurde die Datei iobroker.js-controller/lib/tools irgendwann zwischen Version 5.0.1 bis 5.0.5 vom js-controller verschoben. Vor wenigen Wochen versuchte ich schon mal mit history2db.js und da trat der Fehler nicht auf.
Ich bin mir unsicher ob und wie man ggf. den js-controller in Docker wieder zurückrollen kann/sollte.