NEWS
Cannot find module '@iobroker/types'
-
Nicht wirklich.
Weil wenn heute adapter xyz aktualisiert wird benötigt der weder einen neuen Admin noch js-controller 5. Trotzdem kann er adapter-core 3.0.3 beinhalgen und daher npm6 nicht vertragen. -
@mcm57
Naja, man könnte aber halt dennoch durch 'sanften Druck' an einem core adapter insgesamt eine stärkere Verbreitung von nodejs > 16 forcieren.
Sollte man auch imho, nodejs@16 verliert in wenigen Wochen den Support vom Projekt. -
======================= SUMMARY ======================= v.2023-04-16 Operatingsystem: Raspbian GNU/Linux 10 (buster) Kernel: 5.10.103-v7l+ Installation: Native Timezone: Europe/Berlin (CEST, +0200) User-ID: 1000 X-Server: false Boot Target: graphical.target Pending OS-Updates: 0 Pending iob updates: 8 Nodejs-Installation: /usr/bin/nodejs v14.21.3 /home/pi/.nvm/versions/node/v14.17.3/bin/node v14.17.3 /home/pi/.nvm/versions/node/v14.17.3/bin/npm 6.14.13 /home/pi/.nvm/versions/node/v14.17.3/bin/npx 6.14.13 Recommended versions are nodejs 18.x.y and npm 9.x.y *** nodejs is NOT correctly installed *** MEMORY: total used free shared buff/cache available Mem: 3.8G 1.2G 1.1G 26M 1.5G 2.6G Swap: 99M 0B 99M Total: 3.9G 1.2G 1.2G Active iob-Instances: 16 Active repo(s): beta ioBroker Core: js-controller 5.0.11 admin 6.6.5 ioBroker Status: iobroker is running on this host. Objects type: jsonl States type: jsonl Status admin and web instance: system.adapter.admin.0 : admin : raspberrypi - enabled, port: 8081, bind: 0.0.0.0, run as: admin Objects: 10802 States: 6279 Size of iob-Database: 21M /opt/iobroker/iobroker-data/objects.jsonl 6.1M /opt/iobroker/iobroker-data/objects.json.migrated 6.1M /opt/iobroker/iobroker-data/objects.json.bak.migrated 12K /opt/iobroker/iobroker-data/objects.json.old 2.4M /opt/iobroker/iobroker-data/states.jsonl 2.0M /opt/iobroker/iobroker-data/states.json.old 636K /opt/iobroker/iobroker-data/states.json.migrated 636K /opt/iobroker/iobroker-data/states.json.bak.migrated 0 /opt/iobroker/iobroker-data/states.json.broken =================== END OF SUMMARY ====================
Also muss ich nodeJS neu installieren?
-
@00000x sagte in Cannot find module '@iobroker/types':
Nodejs-Installation: /usr/bin/nodejs v14.21.3
/home/pi/.nvm/versions/node/v14.17.3/bin/node v14.17.3
/home/pi/.nvm/versions/node/v14.17.3/bin/npm 6.14.13
/home/pi/.nvm/versions/node/v14.17.3/bin/npx 6.14.13steinalt und dazu noch Betauser ???
@00000x sagte in Cannot find module '@iobroker/types':
js-controller 5.0.11
warum ?
-
@00000x sagte in Cannot find module '@iobroker/types':
buster
Tot, Nachfolger installieren, wenn möglich in der 64Bit-Version.
Und nodejs wird immer per systemeigenen Paketmanager installiert, nie per
n
,nvm
oder wie die Dinger auch alle heißen mögen.Ob Active repo(s): beta das richtige Repo für dich ist wage ich auch zu bezweifeln.
-
Bin nun auf 18 und 9.
Nodejs-Installation: /usr/bin/nodejs v18.17.0 /home/pi/.nvm/versions/node/v14.17.3/bin/node v14.17.3 /usr/local/bin/npm 9.6.7 /usr/local/bin/npx 9.6.7
Immer noch gleich der Fehler:
2023-08-08 18:58:45.363 - [32minfo[39m: host.raspberrypi instance system.adapter.admin.0 started with pid 1380 2023-08-08 18:58:48.988 - [31merror[39m: host.raspberrypi Caught by controller[0]: node:internal/modules/cjs/loader:1080 2023-08-08 18:58:48.989 - [31merror[39m: host.raspberrypi Caught by controller[0]: throw err; 2023-08-08 18:58:48.990 - [31merror[39m: host.raspberrypi Caught by controller[0]: ^ 2023-08-08 18:58:48.990 - [31merror[39m: host.raspberrypi Caught by controller[0]: Error: Cannot find module '@iobroker/types' 2023-08-08 18:58:48.991 - [31merror[39m: host.raspberrypi Caught by controller[0]: Require stack: 2023-08-08 18:58:48.991 - [31merror[39m: host.raspberrypi Caught by controller[0]: - /opt/iobroker/node_modules/iobroker.admin/node_modules/@iobroker/adapter-core/build/index.js 2023-08-08 18:58:48.991 - [31merror[39m: host.raspberrypi Caught by controller[0]: - /opt/iobroker/node_modules/iobroker.admin/main.js 2023-08-08 18:58:48.992 - [31merror[39m: host.raspberrypi Caught by controller[0]: at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15) 2023-08-08 18:58:48.992 - [31merror[39m: host.raspberrypi Caught by controller[0]: at Module._load (node:internal/modules/cjs/loader:922:27) 2023-08-08 18:58:48.992 - [31merror[39m: host.raspberrypi Caught by controller[0]: at Module.require (node:internal/modules/cjs/loader:1143:19) 2023-08-08 18:58:48.993 - [31merror[39m: host.raspberrypi Caught by controller[0]: at require (node:internal/modules/cjs/helpers:110:18) 2023-08-08 18:58:48.993 - [31merror[39m: host.raspberrypi Caught by controller[0]: at Object.<anonymous> (/opt/iobroker/node_modules/iobroker.admin/node_modules/@iobroker/adapter-core/build/index.js:21:1) 2023-08-08 18:58:48.993 - [31merror[39m: host.raspberrypi Caught by controller[0]: at Module._compile (node:internal/modules/cjs/loader:1256:14) 2023-08-08 18:58:48.994 - [31merror[39m: host.raspberrypi Caught by controller[0]: at Module._extensions..js (node:internal/modules/cjs/loader:1310:10) 2023-08-08 18:58:48.994 - [31merror[39m: host.raspberrypi Caught by controller[0]: at Module.load (node:internal/modules/cjs/loader:1119:32) 2023-08-08 18:58:48.994 - [31merror[39m: host.raspberrypi Caught by controller[0]: at Module._load (node:internal/modules/cjs/loader:960:12) 2023-08-08 18:58:48.994 - [31merror[39m: host.raspberrypi Caught by controller[0]: at Module.require (node:internal/modules/cjs/loader:1143:19) { 2023-08-08 18:58:48.995 - [31merror[39m: host.raspberrypi Caught by controller[0]: code: 'MODULE_NOT_FOUND', 2023-08-08 18:58:48.995 - [31merror[39m: host.raspberrypi Caught by controller[0]: requireStack: [ 2023-08-08 18:58:48.995 - [31merror[39m: host.raspberrypi Caught by controller[0]: '/opt/iobroker/node_modules/iobroker.admin/node_modules/@iobroker/adapter-core/build/index.js', 2023-08-08 18:58:48.995 - [31merror[39m: host.raspberrypi Caught by controller[0]: '/opt/iobroker/node_modules/iobroker.admin/main.js' 2023-08-08 18:58:48.996 - [31merror[39m: host.raspberrypi Caught by controller[0]: ] 2023-08-08 18:58:48.996 - [31merror[39m: host.raspberrypi Caught by controller[0]: } 2023-08-08 18:58:48.996 - [31merror[39m: host.raspberrypi Caught by controller[0]: Node.js v18.17.0 2023-08-08 18:58:48.997 - [31merror[39m: host.raspberrypi instance system.adapter.admin.0 terminated with code 1 (JS_CONTROLLER_STOPPED)
-
@00000x sagte in Cannot find module '@iobroker/types':
Bin nun auf 18 und 9.
Nein.
Lies bitte die Aufräum-Anleitung aus meiner Signatur. -
@00000x
Hast du den Adapter NACH dem npm Upgrade neu installiert ? -
@mcm57
Du meinst NACH dem Aufräumen und Geraderücken?
-
@thomas-braun
Ja
Nachdem node u npm sauber installiert sind.
Ohne einexsaubere Basis macht eine Analyse null Sinn. -
hab das selbe problem bei meiner ziemlich alten iobroker installation nach einem upgrade von web, admin & socket adapter die ich wohl lieber auslassen hätte sollen...
hab nun wie mcm57 auch auf node 18 upgegradet, aber das hat genau wie bei diesem bei mir auch nicht's gebracht.
Gibt's tipps wie man das wieder hinbekommen könnte?
UPDATE: hab gerade entdeckt dass ich auf dem system noch eine veraltete npm version unter /usr/local/ hatte. hab die deaktiviert damit die neue via apt vom nodereleases repository installierte greift, und probier jetzt nochmal die fix procedure durch..
-
@tigiba sagte in Cannot find module '@iobroker/types':
hab die deaktiviert
Was meinst du damit? Die muss gelöscht werden.
Bist du sicher, dass deine Umgebung jetzt sauber ist?Kannst du ja mal per
iob diag
oder
per node-fix-Skript (siehe meine Signatur) prüfen. -
Damit es ggF klar ist
Node muss VOR der Installation nezerer Adapterreleases auf 16++ (empfohlen 18) sein.
Ein spätere node upgrade installiert NIcht wss fie Adapterknszalltion wg altem npm susgelassen hat.
-
@mcm57 sagte in Cannot find module '@iobroker/types':
Ein spätere node upgrade installiert NIcht wss fie Adapterknszalltion wg altem npm susgelassen hat.
Nein, dazu muss der Adapter nochmal 'drübergebügelt' werden.
-
@thomas-braun said in Cannot find module '@iobroker/types':
Was meinst du damit?
hab
mv /usr/local/bin/npm /usr/local/bin/npm_old
gemacht, das hat gereicht um den iobroker wieder zum funktionieren zu bekommen. Natürlich wäre Löschen und richtig aufräumen die sauberere Lösung, aber jeder optimiert seine Zeit wie er kannUnd durch aufheben des backups kann ich falls irgendwas andres auf dem system dann doch wieder das alte npm braucht leicht drauf zurückgreifen.
Danach in
/opt/iobroker
einsudo -u iobroker npm install --production
ausgeführt und dann hat dassudo -u iobroker ./iob start admin
undsudo -u iobroker ./iob start web
wieder geklappt.Das
iob diag
ist nach 20 Minuten noch immer hier gehangen, dann hab ich's abgebrochen:Files in neuralgic directories: /var:
LG tigiba!
-
@tigiba sagte in Cannot find module '@iobroker/types':
richtig aufräumen die sauberere Lösung
Und genau das solltest du tun.
Das iob diag ist nach 20 Minuten noch immer hier gehangen,
Das deutet auf ein krummes System hin. Das läuft nämlich im Allgemeinen nicht so lange.
Da hast du dann deine Zeit falsch 'optimiert'.