NEWS
Alpha Test js-controller Kiera (v6.0)
-
@foxriver76 Ich habe meine System gerade einmal auf nodejs 20 (über iob nodejs-update 20 aktualisiert, da du ganz am Anfang geschrieben hattest, dass die Empfehlung jetzt nodejs20 ist.
Wenn ich jetzt den js-controller installieren will kommt folgende Fehlermeldung
proxmox@ioBrokerTestsystem:~$ iob stop proxmox@ioBrokerTestsystem:~$ cd /opt/iobroker/ proxmox@ioBrokerTestsystem:/opt/iobroker$ npm i iobroker.js-controller@next --omit=dev npm ERR! code EBADENGINE npm ERR! engine Unsupported engine npm ERR! engine Not compatible with your version of node/npm: @appland/appmap-agent-js@13.9.1 npm ERR! notsup Not compatible with your version of node/npm: @appland/appmap-agent-js@13.9.1 npm ERR! notsup Required: {"node":"14.x.x || 16.x.x || 17.x.x || 18.x.x || 19.x.x"} npm ERR! notsup Actual: {"npm":"10.5.2","node":"v20.13.1"} npm ERR! A complete log of this run can be found in: /home/iobroker/.npm/_logs/2024-05-22T11_53_14_435Z-debug-0.log
iob diag:
-
@foxriver76
OK, sorry - mein Fehler.
Ich bin davon ausgegangen dass jemand der js-controller 6 alpha installiert auch die latest Versionen der anderern Adapter installiert hat.Offenbar ist der SQL Adapter auf GH um einiges weiter als der npm / latest / stable Stand
Alles klar soweit.
-
@mcm1957 Ja, es ist echt nur auf GitHub mit 3.x sql latest und stable ist 2 jahre alt
-
@feuersturm sagte in Alpha Test js-controller Kiera (v6.0):
@appland/appmap-agent-js
das dürfte nicht vom controller kommen, mach mal
npm ls @appland/appmap-agent-js
in/opt/iobroker
-
@foxriver76 Das ist die Ausgabe
proxmox@ioBrokerTestsystem:/opt/iobroker$ npm ls @appland/appmap-agent-js iobroker.inst@2.0.3 /opt/iobroker `-- iobroker.device-manager@0.0.3 `-- @appland/appmap-agent-js@13.9.1
-
@feuersturm die inkompatible dependency bringt der
device-manager
Adapter mit, gerne dort mal ein Issue eröffnen. Ansonsten kannst du natürlich auch gerne mit node v18 testen. -
@foxriver76 Danke. Issue https://github.com/ioBroker/ioBroker.device-manager/issues/42 wurde beim device-manager erstellt. Dann mach ich mal ein downgrade
-
@foxriver76 Nach dem Downgrade auf nodejs18 ging die Installation vom js-controller6 ohne Probleme.
Beim Start wirft der Admin Adapter 6.17.11 fehler und kann nicht gestartet werden.2024-05-22 14:28:04.907 - info: host.ioBrokerTestsystem iobroker.js-controller version 6.0.0 js-controller starting 2024-05-22 14:28:04.921 - info: host.ioBrokerTestsystem Copyright (c) 2014-2023 bluefox, 2014 hobbyquaker 2024-05-22 14:28:04.925 - info: host.ioBrokerTestsystem hostname: ioBrokerTestsystem, node: v18.20.3 2024-05-22 14:28:04.929 - info: host.ioBrokerTestsystem ip addresses: 192.168.178.77 fe80::f854:cfff:fe5f:6c25 2024-05-22 14:28:07.666 - info: host.ioBrokerTestsystem connected to Objects and States 2024-05-22 14:28:07.713 - info: host.ioBrokerTestsystem added notifications configuration of host 2024-05-22 14:28:08.866 - info: host.ioBrokerTestsystem 64 instances found 2024-05-22 14:28:08.975 - info: host.ioBrokerTestsystem starting 27 instances 2024-05-22 14:28:09.740 - info: host.ioBrokerTestsystem Delete state "system.host.ioBrokerTestsystem.versions.nodeCurrent" 2024-05-22 14:28:09.822 - info: host.ioBrokerTestsystem Delete state "system.host.ioBrokerTestsystem.versions.nodeNewest" 2024-05-22 14:28:09.893 - info: host.ioBrokerTestsystem Delete state "system.host.ioBrokerTestsystem.versions.nodeNewestNext" 2024-05-22 14:28:09.929 - info: host.ioBrokerTestsystem instance system.adapter.admin.0 started with pid 19670 2024-05-22 14:28:10.082 - info: host.ioBrokerTestsystem Delete state "system.host.ioBrokerTestsystem.versions.npmCurrent" 2024-05-22 14:28:10.108 - info: host.ioBrokerTestsystem Delete state "system.host.ioBrokerTestsystem.versions.npmNewest" 2024-05-22 14:28:10.126 - info: host.ioBrokerTestsystem Delete state "system.host.ioBrokerTestsystem.versions.npmNewestNext" 2024-05-22 14:28:10.137 - info: host.ioBrokerTestsystem Some obsolete host states deleted. 2024-05-22 14:28:13.695 - info: host.ioBrokerTestsystem instance system.adapter.influxdb.0 started with pid 19677 2024-05-22 14:28:16.342 - info: admin.0 (19670) starting. Version 6.17.11 in /opt/iobroker/node_modules/iobroker.admin, node: v18.20.3, js-controller: 6.0.0 2024-05-22 14:28:16.436 - info: admin.0 (19670) requesting all objects 2024-05-22 14:28:20.148 - info: admin.0 (19670) received all objects 2024-05-22 14:28:20.331 - info: host.ioBrokerTestsystem instance system.adapter.javascript.0 started with pid 19708 2024-05-22 14:28:20.749 - error: admin.0 (19670) Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). 2024-05-22 14:28:20.753 - error: admin.0 (19670) unhandled promise rejection: utils.commonTools.session is not a function 2024-05-22 14:28:20.768 - error: admin.0 (19670) TypeError: utils.commonTools.session is not a function at Web.#init (/opt/iobroker/node_modules/iobroker.admin/build-backend/lib/web.js:451:50) at new Web (/opt/iobroker/node_modules/iobroker.admin/build-backend/lib/web.js:167:19) at /opt/iobroker/node_modules/iobroker.admin/build-backend/main.js:1289:46 at Immediate.<anonymous> (/opt/iobroker/node_modules/iobroker.admin/build-backend/main.js:1136:25) at processImmediate (node:internal/timers:478:21) 2024-05-22 14:28:20.772 - error: admin.0 (19670) utils.commonTools.session is not a function 2024-05-22 14:28:21.208 - info: admin.0 (19670) terminating http server on port 8081 2024-05-22 14:28:21.215 - info: admin.0 (19670) terminating 2024-05-22 14:28:21.221 - warn: admin.0 (19670) Terminated (UNCAUGHT_EXCEPTION): Without reason 2024-05-22 14:28:21.237 - info: admin.0 (19670) Request actual repository... 2024-05-22 14:28:21.738 - info: admin.0 (19670) terminating 2024-05-22 14:28:22.423 - warn: admin.0 (19670) redis get admin.0.info.newsLastId, error - Connection is closed. 2024-05-22 14:28:22.445 - warn: admin.0 (19670) get state error: Connection is closed. 2024-05-22 14:28:22.518 - warn: admin.0 (19670) get state error: Connection is closed. 2024-05-22 14:28:22.526 - warn: admin.0 (19670) get state error: Connection is closed. 2024-05-22 14:28:22.530 - warn: admin.0 (19670) get state error: Connection is closed. 2024-05-22 14:28:22.534 - warn: admin.0 (19670) get state error: Connection is closed. 2024-05-22 14:28:22.538 - warn: admin.0 (19670) get state error: Connection is closed. 2024-05-22 14:28:22.594 - warn: admin.0 (19670) Cannot check node.js/npm version 2024-05-22 14:28:22.981 - error: host.ioBrokerTestsystem Caught by controller[0]: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason: 2024-05-22 14:28:22.986 - error: host.ioBrokerTestsystem Caught by controller[0]: TypeError: utils.commonTools.session is not a function 2024-05-22 14:28:22.992 - error: host.ioBrokerTestsystem Caught by controller[0]: at Web.#init (/opt/iobroker/node_modules/iobroker.admin/build-backend/lib/web.js:451:50) 2024-05-22 14:28:22.997 - error: host.ioBrokerTestsystem Caught by controller[0]: at new Web (/opt/iobroker/node_modules/iobroker.admin/build-backend/lib/web.js:167:19) 2024-05-22 14:28:23.001 - error: host.ioBrokerTestsystem Caught by controller[0]: at /opt/iobroker/node_modules/iobroker.admin/build-backend/main.js:1289:46 2024-05-22 14:28:23.007 - error: host.ioBrokerTestsystem Caught by controller[0]: at Immediate.<anonymous> (/opt/iobroker/node_modules/iobroker.admin/build-backend/main.js:1136:25) 2024-05-22 14:28:23.011 - error: host.ioBrokerTestsystem Caught by controller[0]: at processImmediate (node:internal/timers:478:21) 2024-05-22 14:28:23.015 - error: host.ioBrokerTestsystem instance system.adapter.admin.0 terminated with code 6 (UNCAUGHT_EXCEPTION)
-
@feuersturm said in Alpha Test js-controller Kiera (v6.0):
@foxriver76 Danke. Issue https://github.com/ioBroker/ioBroker.device-manager/issues/42 wurde beim device-manager erstellt. Dann mach ich mal ein downgrade
Da muss der device-manager ev. intensiver angepasst werden. Das Repo von appmap-agent-js wurde archiviert und auf npm ist das package nicht mehr via Suche zu finden.
https://github.com/getappmap/appmap-agent-jsIst aber für js-controlelr 6 irrelevant.
-
@foxriver76 sagte in Alpha Test js-controller Kiera (v6.0):
Windows
Generell muss das Update manuell via npm installiert werden.
Hierzu im ioBroker-Verzeichnis nach stoppen des ioBroker den Befehl npm i iobroker.js-controller@next --omit=dev ausführen.Hallo,
nach dem installieren startet der IOB nicht, er beendet sich immer automatisch.
********************************************************** *** Welcome to ioBroker. *** *** *** *** Type 'iob help' for list of instructions. *** *** For more help see *** *** https://github.com/ioBroker/ioBroker.docs *** ********************************************************** Your environment has been set up for using Node.js 18.20.3 (x64) and npm. C:\Test>npm ls @iobroker/adapter-core iobroker.inst@3.0.0 C:\Test +-- iobroker.admin@6.13.16 | +-- @iobroker/adapter-core@3.1.4 | `-- @iobroker/socket-classes@1.5.0 | `-- @iobroker/adapter-core@3.1.4 deduped +-- iobroker.backitup@2.11.0 | `-- @iobroker/adapter-core@3.1.4 deduped +-- iobroker.discovery@4.4.0 | `-- @iobroker/adapter-core@3.1.4 deduped `-- iobroker.js-controller@6.0.1-alpha.0-20240522-f267270b9 `-- @iobroker/adapter-core@3.1.4 deduped C:\Test>
Edit:
Bin wieder auf Version 5.0.19 , alles läuft wieder.
-
@sigi234 said in Alpha Test js-controller Kiera (v6.0):
nach dem installieren startet der IOB nicht, er beendet sich immer automatisch.
Exakt das Gleiche beobachte ich auch. Beim Start wird nicht mal was in die Log Datei geschrieben, auch nicht, wenn ich die Controller Log Ausgabe auf Debug schalte.
Ach ja:
npm ls @iobroker/adapter-core iobroker.inst@3.0.0 C:\ioBroker\SmartHome1 +-- iobroker.admin@6.17.11 | +-- @iobroker/adapter-core@3.1.4 | `-- @iobroker/socket-classes@1.5.0 | `-- @iobroker/adapter-core@3.1.4 deduped +-- iobroker.backitup@2.11.0 | `-- @iobroker/adapter-core@3.1.4 deduped +-- iobroker.discovery@4.5.0 | `-- @iobroker/adapter-core@3.1.4 deduped +-- iobroker.habpanel@0.5.0 | `-- @iobroker/adapter-core@2.6.8 +-- iobroker.javascript@8.3.1 | `-- @iobroker/adapter-core@3.1.4 deduped +-- iobroker.js-controller@6.0.1-alpha.0-20240522-f267270b9 | `-- @iobroker/adapter-core@3.1.4 deduped +-- iobroker.socketio@6.7.0 | `-- @iobroker/adapter-core@3.1.4 deduped +-- iobroker.web@6.2.5 | +-- @iobroker/adapter-core@3.1.4 deduped | +-- iobroker.simple-api@2.7.2 | | `-- @iobroker/adapter-core@2.6.8 | +-- iobroker.socketio@6.6.1 | | `-- @iobroker/adapter-core@3.1.4 deduped | `-- iobroker.ws@2.5.11 | `-- @iobroker/adapter-core@3.1.4 deduped `-- iobroker.ws@2.6.1 `-- @iobroker/adapter-core@3.1.4 deduped
-
@feuersturm Kannst du nochmal neu installieren
gleiches gilt für @Thomas-Braun ich hoffe die Fehler sind gefixt.
-
@gaspode Kannst du mal direkt mittels
node
diecontroller.js
ausführen (liegt in deinennode_modules/iobroker.js-controller/controller.js
), da müsste dann ein Fehler auftauchen hoffe ich. -
@foxriver76 said in Alpha Test js-controller Kiera (v6.0):
@gaspode Kannst du mal direkt mittels node die controller.js ausführen
Ja, dann läuft er hoch.
Start per Service liefert im Service error log file daemon\iob_smarthome1.err.log:
C:\ioBroker\SmartHome1\controller.js:2 require('./node_modules/iobroker.js-controller/controller.js'); ^ Error [ERR_REQUIRE_ESM]: require() of ES Module C:\ioBroker\SmartHome1\node_modules\iobroker.js-controller\controller.js from C:\ioBroker\SmartHome1\controller.js not supported. C:\ioBroker\SmartHome1\node_modules\iobroker.js-controller\controller.js is treated as an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which declares all .js files in that package scope as ES modules. Instead either rename C:\ioBroker\SmartHome1\node_modules\iobroker.js-controller\controller.js to end in .cjs, change the requiring code to use dynamic import() which is available in all CommonJS modules, or change "type": "module" to "type": "commonjs" in C:\ioBroker\SmartHome1\node_modules\iobroker.js-controller\package.json to treat all .js files as CommonJS (using .mjs for all ES modules instead). at Object.<anonymous> (C:\ioBroker\SmartHome1\controller.js:2:1) { code: 'ERR_REQUIRE_ESM' } Node.js v18.20.3 C:\ioBroker\SmartHome1\controller.js:2 require('./node_modules/iobroker.js-controller/controller.js'); ^ Error [ERR_REQUIRE_ESM]: require() of ES Module C:\ioBroker\SmartHome1\node_modules\iobroker.js-controller\controller.js from C:\ioBroker\SmartHome1\controller.js not supported. C:\ioBroker\SmartHome1\node_modules\iobroker.js-controller\controller.js is treated as an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which declares all .js files in that package scope as ES modules. Instead either rename C:\ioBroker\SmartHome1\node_modules\iobroker.js-controller\controller.js to end in .cjs, change the requiring code to use dynamic import() which is available in all CommonJS modules, or change "type": "module" to "type": "commonjs" in C:\ioBroker\SmartHome1\node_modules\iobroker.js-controller\package.json to treat all .js files as CommonJS (using .mjs for all ES modules instead). at Object.<anonymous> (C:\ioBroker\SmartHome1\controller.js:2:1) { code: 'ERR_REQUIRE_ESM' } Node.js v18.20.3 C:\ioBroker\SmartHome1\controller.js:2 require('./node_modules/iobroker.js-controller/controller.js'); ^ Error [ERR_REQUIRE_ESM]: require() of ES Module C:\ioBroker\SmartHome1\node_modules\iobroker.js-controller\controller.js from C:\ioBroker\SmartHome1\controller.js not supported. C:\ioBroker\SmartHome1\node_modules\iobroker.js-controller\controller.js is treated as an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which declares all .js files in that package scope as ES modules. Instead either rename C:\ioBroker\SmartHome1\node_modules\iobroker.js-controller\controller.js to end in .cjs, change the requiring code to use dynamic import() which is available in all CommonJS modules, or change "type": "module" to "type": "commonjs" in C:\ioBroker\SmartHome1\node_modules\iobroker.js-controller\package.json to treat all .js files as CommonJS (using .mjs for all ES modules instead). at Object.<anonymous> (C:\ioBroker\SmartHome1\controller.js:2:1) { code: 'ERR_REQUIRE_ESM' } Node.js v18.20.3
-
@gaspode kannst du den Inhalt von controller.js zeigen, das klingt iwie als wurde das irgendwie nicht aktualisiert.
Bzw. ist das bei dir eine
controller.js
die im Root-verzeichnis der Installation liegt? Wird die vom Installer erstellt, weißt du das evtl? Dann müsste diese auch angepasst werden von uns für die ESM Thematik. -
Nein, hier hagelt es weiterhin Fehler beim bauen.
Genaueres später, mit richtigem Terminal. -
@foxriver76 said in Alpha Test js-controller Kiera (v6.0):
Dann müsste diese auch angepasst werden von uns für die ESM Thematik.
Ja, in die Richtung hab ich auch schon überlegt. Der Service wird so angelegt:
const svc = new Service({ name: process.env.iobServiceName ? process.env.iobServiceName : 'ioBroker', description: 'ioBroker service.', script: require('path').join(__dirname, 'controller.js'), env: { name: 'NODE_ENV', value: 'production' } });
Und controller.js liegt tatsächlich im Inst. Root und lautet
'use strict'; require('./node_modules/iobroker.js-controller/controller.js');
-
@gaspode Hm okay die required dann wiederum die vom Controller. Die müsste jetzt eigentlich das require durch import ersetzen. Was passiert wenn du mal hart editierst und das
require
durchimport
ersetzt? -
@foxriver76 said in Alpha Test js-controller Kiera (v6.0):
Was passiert wenn du mal hart editierst und das require durch import ersetzt?
Läuft.
Die Datei kommt übrigens von hier:
https://github.com/ioBroker/ioBroker/blob/master/install/windows/controller.js
Sie wird vom Windows Installationsscript im Installationsverlauf dort hin kopiert. -
@gaspode Top, danke für das Feedback.