Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. ioBroker Allgemein
    4. [How-to] Node.js ioBroker richtig updaten-2021/22 Edition

    NEWS

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    [How-to] Node.js ioBroker richtig updaten-2021/22 Edition

    This topic has been deleted. Only users with topic management privileges can see it.
    • apollon77
      apollon77 @marlan99 last edited by apollon77

      @marlan99 sagte in [How-to] Node.js ioBroker richtig updaten-2021/22 Edition:

      /opt/iobroker/node_modules/node-mbus/

      Naja in dem Fall meckert er über das native node_mbus und nicht über serialport ...

      also (blöd das der rebuild net tut)

      cd /opt/iobroker/node_modules/node-mbus/
      npm rebuild

      oder wenn das nicht tat "npm install"

      PS: Bzw kannst gern mal das volle ipbroker log aller drei rebuild versuche posten. Welcher jscontroller ist eim EInsatz?

      Homoran 1 Reply Last reply Reply Quote 0
      • Homoran
        Homoran Global Moderator Administrators @apollon77 last edited by

        @apollon77 sagte in [How-to] Node.js ioBroker richtig updaten-2021/22 Edition:

        oder wenn das nicht tat "npm install"

        Hat er ja schon gemacht. War die Ausführung korrekt?

        @marlan99 sagte in [How-to] Node.js ioBroker richtig updaten-2021/22 Edition:

        habe ich auch wie Eingangs erwähnt versucht das Problem manuell zu lösen und im Verzeichnis
        /opt/iobroker/node_modules/node-mbus/node_modules
        den Befehl:
        npm install --production
        ausgeführt

        apollon77 1 Reply Last reply Reply Quote 0
        • apollon77
          apollon77 @Homoran last edited by

          @homoran Da ist ein node_modules am Ende zuviel ...

          Homoran 1 Reply Last reply Reply Quote 1
          • Homoran
            Homoran Global Moderator Administrators @apollon77 last edited by

            @apollon77 sagte in [How-to] Node.js ioBroker richtig updaten-2021/22 Edition:

            @homoran Da ist ein node_modules am Ende zu viel ...

            👓

            1 Reply Last reply Reply Quote 0
            • M
              marlan99 last edited by marlan99

              hierbei bekomme ich folgenden Output:

              js-controller version : 4.0.23

              npm rebuild

              pi@iobroker-slave:/opt/iobroker/node_modules/node-mbus $ npm rebuild
              npm ERR! code 1
              npm ERR! path /opt/iobroker/node_modules/node-mbus
              npm ERR! command failed
              npm ERR! command sh -c node-gyp rebuild
              npm ERR! node:internal/modules/cjs/loader:936
              npm ERR!   throw err;
              npm ERR!   ^
              npm ERR! 
              npm ERR! Error: Cannot find module 'object-assign'
              npm ERR! Require stack:
              npm ERR! - /usr/lib/node_modules/npm/node_modules/node-gyp/node_modules/gauge/render-template.js
              npm ERR! - /usr/lib/node_modules/npm/node_modules/node-gyp/node_modules/gauge/plumbing.js
              npm ERR! - /usr/lib/node_modules/npm/node_modules/node-gyp/node_modules/gauge/index.js
              npm ERR! - /usr/lib/node_modules/npm/node_modules/node-gyp/node_modules/npmlog/log.js
              npm ERR! - /usr/lib/node_modules/npm/node_modules/node-gyp/lib/node-gyp.js
              npm ERR! - /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js
              npm ERR!     at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
              npm ERR!     at Function.Module._load (node:internal/modules/cjs/loader:778:27)
              npm ERR!     at Module.require (node:internal/modules/cjs/loader:1005:19)
              npm ERR!     at require (node:internal/modules/cjs/helpers:102:18)
              npm ERR!     at Object.<anonymous> (/usr/lib/node_modules/npm/node_modules/node-gyp/node_modules/gauge/render-template.js:4:20)
              npm ERR!     at Module._compile (node:internal/modules/cjs/loader:1105:14)
              npm ERR!     at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
              npm ERR!     at Module.load (node:internal/modules/cjs/loader:981:32)
              npm ERR!     at Function.Module._load (node:internal/modules/cjs/loader:822:12)
              npm ERR!     at Module.require (node:internal/modules/cjs/loader:1005:19) {
              npm ERR!   code: 'MODULE_NOT_FOUND',
              npm ERR!   requireStack: [
              npm ERR!     '/usr/lib/node_modules/npm/node_modules/node-gyp/node_modules/gauge/render-template.js',
              npm ERR!     '/usr/lib/node_modules/npm/node_modules/node-gyp/node_modules/gauge/plumbing.js',
              npm ERR!     '/usr/lib/node_modules/npm/node_modules/node-gyp/node_modules/gauge/index.js',
              npm ERR!     '/usr/lib/node_modules/npm/node_modules/node-gyp/node_modules/npmlog/log.js',
              npm ERR!     '/usr/lib/node_modules/npm/node_modules/node-gyp/lib/node-gyp.js',
              npm ERR!     '/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js'
              npm ERR!   ]
              npm ERR! }
              
              npm ERR! A complete log of this run can be found in:
              npm ERR!     /home/iobroker/.npm/_logs/2022-07-21T13_44_59_646Z-debug-0.log
              

              bei "npm install" dann diesen output:

              pi@iobroker-slave:/opt/iobroker/node_modules/node-mbus $ npm install
              
              > node-mbus@2.0.0 install
              > node-gyp rebuild
              
              node:internal/modules/cjs/loader:936
                throw err;
                ^
              
              Error: Cannot find module 'object-assign'
              Require stack:
              - /usr/lib/node_modules/npm/node_modules/node-gyp/node_modules/gauge/render-template.js
              - /usr/lib/node_modules/npm/node_modules/node-gyp/node_modules/gauge/plumbing.js
              - /usr/lib/node_modules/npm/node_modules/node-gyp/node_modules/gauge/index.js
              - /usr/lib/node_modules/npm/node_modules/node-gyp/node_modules/npmlog/log.js
              - /usr/lib/node_modules/npm/node_modules/node-gyp/lib/node-gyp.js
              - /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js
                  at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
                  at Function.Module._load (node:internal/modules/cjs/loader:778:27)
                  at Module.require (node:internal/modules/cjs/loader:1005:19)
                  at require (node:internal/modules/cjs/helpers:102:18)
                  at Object.<anonymous> (/usr/lib/node_modules/npm/node_modules/node-gyp/node_modules/gauge/render-template.js:4:20)
                  at Module._compile (node:internal/modules/cjs/loader:1105:14)
                  at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
                  at Module.load (node:internal/modules/cjs/loader:981:32)
                  at Function.Module._load (node:internal/modules/cjs/loader:822:12)
                  at Module.require (node:internal/modules/cjs/loader:1005:19) {
                code: 'MODULE_NOT_FOUND',
                requireStack: [
                  '/usr/lib/node_modules/npm/node_modules/node-gyp/node_modules/gauge/render-template.js',
                  '/usr/lib/node_modules/npm/node_modules/node-gyp/node_modules/gauge/plumbing.js',
                  '/usr/lib/node_modules/npm/node_modules/node-gyp/node_modules/gauge/index.js',
                  '/usr/lib/node_modules/npm/node_modules/node-gyp/node_modules/npmlog/log.js',
                  '/usr/lib/node_modules/npm/node_modules/node-gyp/lib/node-gyp.js',
                  '/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js'
                ]
              }
              npm ERR! code 1
              npm ERR! path /opt/iobroker/node_modules/node-mbus
              npm ERR! command failed
              npm ERR! command sh -c node-gyp rebuild
              
              npm ERR! A complete log of this run can be found in:
              npm ERR!     /home/iobroker/.npm/_logs/2022-07-21T13_45_14_702Z-debug-0.log
              
              apollon77 Thomas Braun 2 Replies Last reply Reply Quote 0
              • apollon77
                apollon77 @marlan99 last edited by

                @marlan99 ok, dann 'back to node js installarions prüfung mit Thomas Braun " ... da ist was broken in deiner installation von nodejs/npm

                1 Reply Last reply Reply Quote 0
                • Thomas Braun
                  Thomas Braun Most Active @marlan99 last edited by

                  @marlan99

                  Mal npm irgendwie manuell angepackt?
                  Per npm -g i npm oder so?

                  apt policy npm node-gyp
                  
                  M 1 Reply Last reply Reply Quote 0
                  • M
                    marlan99 @Thomas Braun last edited by

                    @thomas-braun wenn ich richtig verstehe soll ich die beiden Befehle ausführen? Manuell habe ich nie was verändert. Das gesamte System wurde mit node.js 12 aufgesetzt, einmal vor Monaten auf node.js 14 updated (null Probleme) und heute auf node.js 16.
                    Habe soeben node.js nochmal komplett neu installiert und habe dieselben Fehlermeldung wie oben.

                    Hier der output mit npm -g i npm

                    pi@iobroker-slave:/opt/iobroker/node_modules/node-mbus $ npm -g i npm
                    npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
                    npm ERR! code EACCES
                    npm ERR! syscall rename
                    npm ERR! path /usr/lib/node_modules/npm
                    npm ERR! dest /usr/lib/node_modules/.npm-qUIFSsiV
                    npm ERR! errno -13
                    npm ERR! Error: EACCES: permission denied, rename '/usr/lib/node_modules/npm' -> '/usr/lib/node_modules/.npm-qUIFSsiV'
                    npm ERR!  [Error: EACCES: permission denied, rename '/usr/lib/node_modules/npm' -> '/usr/lib/node_modules/.npm-qUIFSsiV'] {
                    npm ERR!   errno: -13,
                    npm ERR!   code: 'EACCES',
                    npm ERR!   syscall: 'rename',
                    npm ERR!   path: '/usr/lib/node_modules/npm',
                    npm ERR!   dest: '/usr/lib/node_modules/.npm-qUIFSsiV'
                    npm ERR! }
                    npm ERR! 
                    npm ERR! The operation was rejected by your operating system.
                    npm ERR! It is likely you do not have the permissions to access this file as the current user
                    npm ERR! 
                    npm ERR! If you believe this might be a permissions issue, please double-check the
                    npm ERR! permissions of the file and its containing directories, or try running
                    npm ERR! the command again as root/Administrator.
                    
                    npm ERR! A complete log of this run can be found in:
                    npm ERR!     /home/iobroker/.npm/_logs/2022-07-21T14_13_53_258Z-debug-0.log
                    

                    und hier der output vom Befehl apt policy npm node-gyp

                    pi@iobroker-slave:/opt/iobroker/node_modules/node-mbus $ apt policy npm node-gyp
                    npm:
                      Installed: (none)
                      Candidate: 5.8.0+ds6-4+deb10u2
                      Version table:
                         5.8.0+ds6-4+deb10u2 500
                            500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages
                    node-gyp:
                      Installed: (none)
                      Candidate: 3.8.0-6
                      Version table:
                         3.8.0-6 500
                            500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages
                    
                    Homoran 2 Replies Last reply Reply Quote 0
                    • Homoran
                      Homoran Global Moderator Administrators @marlan99 last edited by

                      @marlan99 was machst du auf dem Slave?

                      bei richtiger Konfiguration des Multihost läuft alles über den Master

                      M 1 Reply Last reply Reply Quote 0
                      • M
                        marlan99 @Homoran last edited by marlan99

                        @homoran der heisst nur so. Sorry wenn das verwirrt.
                        Sind beides unabhängige ioBroker Instanzen auf je einem raspberry pi am laufen. Die handvoll Objekte welche ich auf dem anderen ioBroker benötige tausche ich via mqtt aus.

                        "Mein" Master ist ebenfalls bereits auf node.js 16 updated und dort laufen alle Adapter (auch der zigbee 🙂 )
                        der zweite Raspi hier (mit namen slave) hat nur eine handvoll Adapter drauf und hier kann nur der mbus nicht mehr gestartet werden

                        1 Reply Last reply Reply Quote 0
                        • Homoran
                          Homoran Global Moderator Administrators @marlan99 last edited by

                          @marlan99 sagte in [How-to] Node.js ioBroker richtig updaten-2021/22 Edition:

                          Hier der output mit npm -g i npm

                          das sollzest du ja auch gar nicht machen! ist böse!
                          Deswegen hat @thomas-braun ja gefragt ob du das vielleicht mal benutzt hattest

                          M 1 Reply Last reply Reply Quote 0
                          • M
                            marlan99 @Homoran last edited by

                            @homoran uups 👼

                            1 Reply Last reply Reply Quote 0
                            • M
                              marlan99 last edited by

                              nächster Versuch nun den Adapter komplett zu deinstallieren um ihn danach wieder erneut zu installieren ist nun ebenfalls fehlgeschlagen:

                              $ iobroker add mbus auto --host iobroker-slave
                              NPM version: 8.11.0
                              Installing iobroker.mbus@2.4.0... (System call)
                              host.iobroker-slave Cannot install iobroker.mbus@2.4.0: 1
                              ERROR: Process exited with code 25
                              
                              Homoran 1 Reply Last reply Reply Quote 0
                              • Homoran
                                Homoran Global Moderator Administrators @marlan99 last edited by Homoran

                                @marlan99 und mit --debug?

                                aber die Frage ob npm richtig installiert ist, ist ja noch offen.

                                M 1 Reply Last reply Reply Quote 0
                                • M
                                  marlan99 @Homoran last edited by

                                  @homoran habe soeben meinen test raspi verwendet um den mbus Adapter mit node.js 16 und npm 8.11 zu installieren.
                                  Läuft hier ohne Probleme (ok habe keinen serial Adapter dran, aber der Adapter lässt sich ohne Fehler starten.

                                  Aus meiner Sicht klar ein Installationsproblem auf meinem "slave".
                                  Ich werde den mal aus dem Backup neu aufsetzen. Da wird ja gemäss info heute auch bereits die node.js 16 verwendet

                                  Homoran 1 Reply Last reply Reply Quote 0
                                  • M
                                    marlan99 last edited by

                                    Hier noch die Ausgabe der Installation mit --debug

                                    pi@iobroker-slave:~ $ iobroker add mbus auto --debug
                                    NPM version: 8.11.0
                                    Installing iobroker.mbus@2.4.0... (System call)
                                    npm ERR! code 1
                                    npm ERR! path /opt/iobroker/node_modules/node-mbus
                                    npm ERR! command failed
                                    npm ERR! command sh -c node-gyp rebuild
                                    npm ERR! node:internal/modules/cjs/loader:936
                                    npm ERR!   throw err;
                                    npm ERR!   ^
                                    npm ERR! 
                                    npm ERR! Error: Cannot find module 'object-assign'
                                    npm ERR! Require stack:
                                    npm ERR! - /usr/lib/node_modules/npm/node_modules/node-gyp/node_modules/gauge/render-template.js
                                    npm ERR! - /usr/lib/node_modules/npm/node_modules/node-gyp/node_modules/gauge/plumbing.js
                                    npm ERR! - /usr/lib/node_modules/npm/node_modules/node-gyp/node_modules/gauge/index.js
                                    npm ERR! - /usr/lib/node_modules/npm/node_modules/node-gyp/node_modules/npmlog/log.js
                                    npm ERR! - /usr/lib/node_modules/npm/node_modules/node-gyp/lib/node-gyp.js
                                    npm ERR! - /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js
                                    npm ERR!     at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
                                    npm ERR!     at Function.Module._load (node:internal/modules/cjs/loader:778:27)
                                    npm ERR!     at Module.require (node:internal/modules/cjs/loader:1005:19)
                                    npm ERR!     at require (node:internal/modules/cjs/helpers:102:18)
                                    npm ERR!     at Object.<anonymous> (/usr/lib/node_modules/npm/node_modules/node-gyp/node_modules/gauge/render-template.js:4:20)
                                    npm ERR!     at Module._compile (node:internal/modules/cjs/loader:1105:14)
                                    npm ERR!     at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
                                    npm ERR!     at Module.load (node:internal/modules/cjs/loader:981:32)
                                    npm ERR!     at Function.Module._load (node:internal/modules/cjs/loader:822:12)
                                    npm ERR!     at Module.require (node:internal/modules/cjs/loader:1005:19) {
                                    npm ERR!   code: 'MODULE_NOT_FOUND',
                                    npm ERR!   requireStack: [
                                    npm ERR!     '/usr/lib/node_modules/npm/node_modules/node-gyp/node_modules/gauge/render-template.js',
                                    npm ERR!     '/usr/lib/node_modules/npm/node_modules/node-gyp/node_modules/gauge/plumbing.js',
                                    npm ERR!     '/usr/lib/node_modules/npm/node_modules/node-gyp/node_modules/gauge/index.js',
                                    npm ERR!     '/usr/lib/node_modules/npm/node_modules/node-gyp/node_modules/npmlog/log.js',
                                    npm ERR!     '/usr/lib/node_modules/npm/node_modules/node-gyp/lib/node-gyp.js',
                                    npm ERR!     '/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js'
                                    npm ERR!   ]
                                    npm ERR! }
                                    
                                    npm ERR! A complete log of this run can be found in:
                                    npm ERR!     /home/iobroker/.npm/_logs/2022-07-21T14_54_53_188Z-debug-0.log
                                    host.iobroker-slave Cannot install iobroker.mbus@2.4.0: 1
                                    
                                    
                                    1 Reply Last reply Reply Quote 0
                                    • Homoran
                                      Homoran Global Moderator Administrators @marlan99 last edited by

                                      @marlan99 sagte in [How-to] Node.js ioBroker richtig updaten-2021/22 Edition:

                                      der Adapter lässt sich ohne Fehler starten.
                                      Aus meiner Sicht klar ein Installationsproblem auf meinem "slave".

                                      aus meiner auch!

                                      @marlan99 sagte in [How-to] Node.js ioBroker richtig updaten-2021/22 Edition:

                                      Ich werde den mal aus dem Backup neu aufsetzen. Da wird ja gemäss info heute auch bereits die node.js 16 verwendet

                                      das wird schneller gehen als den Fehler zu suchen.

                                      M 1 Reply Last reply Reply Quote 0
                                      • M
                                        marlan99 @Homoran last edited by

                                        @homoran system komplett neu aufgesetzt und backup eingespielt. Läuft alles wie es soll.
                                        Keine Ahnung was das Problem war, aber jetzt ist es nicht mehr da.

                                        Danke euch allen für den Support heute Nachmittag

                                        da_Woody 1 Reply Last reply Reply Quote 1
                                        • da_Woody
                                          da_Woody @marlan99 last edited by

                                          @marlan99 👍 es lebt... 😉

                                          J 1 Reply Last reply Reply Quote 1
                                          • J
                                            Josh @da_Woody last edited by

                                            Habe jetzt auch das Upgrade von V14 auf V16 auf meinem Master und den beiden Slaves gewagt. Hat alles wunderbar geklappt. Selbst die beiden ZigBee-Adapter werden wieder grün und auch der rpi2-Adapter.

                                            Danke für die gute Arbeit 🙂

                                            1 Reply Last reply Reply Quote 2
                                            • First post
                                              Last post

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate
                                            FAQ Cloud / IOT
                                            HowTo: Node.js-Update
                                            HowTo: Backup/Restore
                                            Downloads
                                            BLOG

                                            879
                                            Online

                                            31.9k
                                            Users

                                            80.1k
                                            Topics

                                            1.3m
                                            Posts

                                            97
                                            812
                                            319724
                                            Loading More Posts
                                            • Oldest to Newest
                                            • Newest to Oldest
                                            • Most Votes
                                            Reply
                                            • Reply as topic
                                            Log in to reply
                                            Community
                                            Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
                                            The ioBroker Community 2014-2023
                                            logo