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 für ioBroker richtig updaten

    NEWS

    • Monatsrückblick - April 2025

    • Minor js-controller 7.0.7 Update in latest repo

    • Save The Date: ioBroker@Smart Living Forum Solingen, 14.06.

    [How-to] Node.js für ioBroker richtig updaten

    This topic has been deleted. Only users with topic management privileges can see it.
    • ?
      A Former User @Thomas Braun last edited by

      @thomas-braun
      Danke Thomas für die Korrektur. Hab auch gerade gesehen, dass ich farbenblind bin. Hab die Farbe für Version 14 verwechselt. 🙄

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

        @hannnes

        Die 14er sollten auch möglichst bald auf 16 gehoben werden.

        Von dem dicken Block auf nodeJS@12 ganz abgesehen, deren Pferd ist tot.

        ? 1 Reply Last reply Reply Quote 0
        • ?
          A Former User @Thomas Braun last edited by A Former User

          @thomas-braun
          hängen doch einige noch auf uralten Versionen fest...
          0d5a98d3-3246-4bf7-ae3f-6b38779118f7-image.png

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

            @hannnes

            Näwah tatsch a ranning süstäm. Oder sowas in der Art ist vermutlich der 'Grund'.

            1 Reply Last reply Reply Quote 1
            • I
              Intruminator last edited by

              Hallo zusammen,

              ich habe einen Raspi mit Buster und iobroker laufen. Node.js habe ich nach den Anleitungen auf v16.19.0 aktualisiert.
              Aber bei "node -v" und "npm -v" bekomme ich noch meine alten Versionen v12.13.1 und 6.12.1 angezeigt. Selbst nach reboot.

              Die Ausgabe vom node.js-Check von Thomas Braun gibts mir folgendes raus:

              armv7l
              Kein Docker
              /usr/bin/nodejs
              /usr/local/bin/node
              /usr/local/bin/npm
              v16.19.0
              v12.13.1
              6.12.1
              4.0.23
              pi
              pi adm dialout cdrom sudo audio video plugdev games users input netdev gpio i2c spi iobroker
              tty
              
              /opt/iobroker
              OK:1 http://archive.raspberrypi.org/debian buster InRelease
              OK:2 http://raspbian.raspberrypi.org/raspbian buster InRelease
              OK:3 https://deb.nodesource.com/node_16.x buster InRelease
              OK:4 https://www.pivccu.de/piVCCU stable InRelease
              Paketlisten werden gelesen... Fertig
              Abhängigkeitsbaum wird aufgebaut.
              Statusinformationen werden eingelesen.... Fertig
              Alle Pakete sind aktuell.
              nodejs:
                Installiert:           16.19.0-deb-1nodesource1
                Installationskandidat: 16.19.0-deb-1nodesource1
                Versionstabelle:
               *** 16.19.0-deb-1nodesource1 500
                      500 https://deb.nodesource.com/node_16.x buster/main armhf Packages
                      100 /var/lib/dpkg/status
                   10.24.0~dfsg-1~deb10u2 500
                      500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages
              
              

              Wisst ihr was das Problem sein könnte?

              Danke und schöne Feiertage euch!
              Sven

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

                @intruminator

                Falscher Pfad. Siehe:

                https://forum.iobroker.net/topic/35090/howto-nodejs-installation-und-upgrades-unter-debian/2

                Und Buster ist tot, installier da das aktuelle Stable-Release 'Bullseye'.

                I 1 Reply Last reply Reply Quote 0
                • I
                  Intruminator @Thomas Braun last edited by

                  @thomas-braun
                  alles klar. Habe es dank euch geschafft.

                  Vielen Dank und wundervolle Weihnachten.
                  Sven

                  1 Reply Last reply Reply Quote 0
                  • G
                    grazer75 last edited by

                    Hallo nach dem Update von 16 auf 18.16.0 gehen einige Adapter nicht mehr korrekt
                    zusätzlich kommt die Meldung öfters langsame Verbindung erkannt.

                    sudo nano /etc/apt/sources.list.d/nodesource.list

                    deb [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x bullseye main
                    deb-src [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x bullseye main
                    
                    

                    uname -m && test -f /opt/scripts/.docker_config/.thisisdocker && echo "Docker-Installation" || echo "Kein Docker" && type -P nodejs node npm && nodejs -v && node -v && npm -v && iob -v && whoami && groups && echo $XDG_SESSION_TYPE && echo $DESKTOP_SESSION && pwd && sudo apt update &> /dev/null && sudo apt update && apt policy nodejs

                    aarch64
                    Kein Docker
                    /usr/bin/nodejs
                    /usr/bin/node
                    /usr/bin/npm
                    v18.16.0
                    v18.16.0
                    9.5.1
                    4.0.24
                    andreas
                    andreas adm dialout cdrom sudo audio video plugdev games users input render netdev gpio i2c spi iobroker
                    tty
                    
                    /opt/iobroker
                    Hit:1 http://archive.raspberrypi.org/debian bullseye InRelease
                    Hit:2 https://deb.nodesource.com/node_18.x bullseye InRelease
                    Hit:3 https://packages.sury.org/php bullseye InRelease
                    Hit:4 http://deb.debian.org/debian bullseye InRelease
                    Hit:5 http://security.debian.org/debian-security bullseye-security InRelease
                    Hit:6 http://deb.debian.org/debian bullseye-updates InRelease
                    Reading package lists... Done
                    Building dependency tree... Done
                    Reading state information... Done
                    All packages are up to date.
                    nodejs:
                      Installed: 18.16.0-deb-1nodesource1
                      Candidate: 18.16.0-deb-1nodesource1
                      Version table:
                     *** 18.16.0-deb-1nodesource1 500
                            500 https://deb.nodesource.com/node_18.x bullseye/main arm64 Packages
                            100 /var/lib/dpkg/status
                         12.22.12~dfsg-1~deb11u3 500
                            500 http://security.debian.org/debian-security bullseye-security/main arm64 Packages
                         12.22.5~dfsg-2~11u1 500
                            500 http://deb.debian.org/debian bullseye/main arm64 Packages
                    
                    

                    Wenn ich einen Adapter mit

                    iobroker rebuild %adapter% --install
                    

                    verwende, verliere ich auch die Einstellungen oder ist das nur eine Neuinstallation & Einstellungen bleiben?

                    Fehler der Adapter zB

                    
                    xbox.0
                    2023-04-16 02:29:23.394	warn	Could not poll API: "No oauth token found. Run authentication flow first"
                    iot.0
                    2023-04-16 02:30:21.640	error	[GHOME] device netatmo-crawler.0.stationData.1.rain is unknown to google home
                    ble.0
                    2023-04-16 02:29:17.487	error	Terminating because A dependency requires a rebuild.
                    

                    588c8732-de3b-4aca-a809-82cab86f52a1-image.png

                    die Meldung von hmip ist nach dem Update auf 18.16.0 auch neu

                    1f853bfb-1a80-4fa8-ad4b-6147b367dcf0-image.png

                    DJMarc75 apollon77 2 Replies Last reply Reply Quote 0
                    • DJMarc75
                      DJMarc75 @grazer75 last edited by

                      @grazer75 bitte alles in Codetags posten, auch die Logs... kann ja sonnst niemand gescheit lesen, analysieren und darauf antworten.

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

                        @grazer75 Also in bin ehrlich, alle hier gezeigten Log Ausschnitte haben nichts mit der Node.-js Version zu tun.

                        1.) "Langsame Verbindung" - Wenn ich annehme was damit gemeint ist eil kein Log da - dann kann das beim ersten Start vorkommen wenn das System recht arg unter last ist. Wenn die Adapter danach laufen ist aber erstmal alles gut. Also mal CPU Nutzung beobachten
                        2.) xbox: Naja dann mach mal was da steht ..."No oauth token found. Run authentication flow first"
                        3.) Deprecated: ignorieren
                        4.) hmip ... Bittelesen und agieren, also falls es noch kein Github issue gibt bitte eins anlegen. Da gibts wohle in Gerät was der Adapter noch nicht kann. Das sollte auch vorher bei einem neustart gekommen sein.

                        1 Reply Last reply Reply Quote 0
                        • G
                          grazer75 last edited by grazer75

                          Ich bin jetzt wieder auf node 16.x zurück, läuft wieder alles, scheinbar ist 18.16.0 bei einigen Adapter noch nicht fit

                          hmip, xbox, tuya, zigbee, javascript hatte ich nur Probleme und errors 😕

                          sudo apt-get purge nodejs -y && sudo apt-get autoremove -y && sudo apt-get autoclean -y
                          sudo curl -sL https://deb.nodesource.com/setup_16.x | sudo bash -
                          sudo apt-get install -y nodejs
                          gemacht und anschließend iob fix & reboot
                          node && which npm
                          v16.19.1
                          v16.19.1
                          8.19.3
                          /usr/bin/nodejs
                          /usr/bin/node
                          /usr/bin/npm
                          

                          Läuft nun alles wieder normal, die npm könnte ich aktualisieren auf 9.5.1 oder besser auf 8.19.3 bleiben?

                          Thomas Braun apollon77 Segway 3 Replies Last reply Reply Quote 0
                          • Thomas Braun
                            Thomas Braun Most Active @grazer75 last edited by Thomas Braun

                            @grazer75 sagte in [How-to] Node.js für ioBroker richtig updaten:

                            tuya, zigbee, javascript

                            Die drei Adapter laufen hier einwandfrei mit nodejs>16

                            die npm könnte ich aktualisieren auf 9.5.1 oder besser auf 8.19.3 bleiben?

                            Finger weg von manuellen Updates von npm. Das kommt immer im Paket mit nodejs daher.

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

                              @grazer75 kann nur zustimmen: Bei allen genannten sind KEINERLEI probleme mit Node.js 18 bekannt ... bzzwww..... welchen js-controller hast Du? Alles unter 4.0.24 kann ggf im Bereich Netzwerk probleme machen

                              1 Reply Last reply Reply Quote 0
                              • Segway
                                Segway @grazer75 last edited by

                                @grazer75 sagte in [How-to] Node.js für ioBroker richtig updaten:

                                Ich bin jetzt wieder auf node 16.x zurück, läuft wieder alles, scheinbar ist 18.16.0 bei einigen Adapter noch nicht fit

                                Kann ich nicht bestätigen v18.15 läuft seit zig Monaten bei mir
                                knapp 40 Adapter laufen.

                                1 Reply Last reply Reply Quote 0
                                • G
                                  grazer75 last edited by

                                  anbei ein iob diag

                                  Operatingsystem:        Debian GNU/Linux 11 (bullseye)
                                  Kernel:                 6.1.21-v8+
                                  Installation:           Native
                                  Timezone:               Europe/Vienna (CEST, +0200)
                                  User-ID:                1000
                                  X-Server:               false
                                  Boot Target:            multi-user.target
                                  
                                  Pending OS-Updates:     0
                                  Pending iob updates:    0
                                  
                                  Nodejs-Installation:    /usr/bin/nodejs         v16.19.1
                                                          /usr/bin/node           v16.19.1
                                                          /usr/bin/npm            8.19.3
                                                          /usr/local/bin/npx              9.5.1
                                  
                                  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:            7.8G        125M        6.6G        6.0M        1.1G        7.6G
                                  Swap:            99M          0B         99M
                                  Total:          7.9G        125M        6.7G
                                  
                                  Active iob-Instances:   1
                                  Active repo(s): stable
                                  
                                  ioBroker Core:          js-controller           4.0.24
                                                          admin                   6.3.5
                                  
                                  ioBroker Status:        iobroker is not 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 (SSL), run as: admin
                                    system.adapter.web.0                    : web                   : raspberrypi                              -  enabled, port: 8082, bind: 0.0.0.0, run as: admin
                                  
                                  Objects:                29769
                                  States:                 25422
                                  
                                  Size of iob-Database:
                                  
                                  21M     /opt/iobroker/iobroker-data/objects.jsonl
                                  7.3M    /opt/iobroker/iobroker-data/states.jsonl
                                  
                                  

                                  "/usr/local/bin/npx 9.5.1" sieht komisch aus, war das nicht auch die npm version bei 18.16.0 ?

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

                                    @grazer75 sagte in [How-to] Node.js für ioBroker richtig updaten:

                                    *** nodejs is NOT correctly installed ***

                                    npx ist im falschen Pfad.
                                    Die nodejs 18, die damit kam hast du also nicht mit dem Paketmanager installiert sondern 'irgendwie anders'. Und dann funktioniert das auch nicht richtig, bekanntermaßen.

                                    G 1 Reply Last reply Reply Quote 0
                                    • G
                                      grazer75 @Thomas Braun last edited by grazer75

                                      @thomas-braun und wie würdest du vorschlagen das Problem zu bereinigen, ausgenommen alles neu zu installieren und backup restore.

                                      Eventuell einfach

                                      npm install -g npm@8
                                      

                                      ausführen?

                                      anbei auch ein Ergebnis von

                                      apt-cache policy nodejs

                                      nodejs:
                                        Installed: 16.19.1-deb-1nodesource1
                                        Candidate: 16.19.1-deb-1nodesource1
                                        Version table:
                                       *** 16.19.1-deb-1nodesource1 500
                                              500 https://deb.nodesource.com/node_16.x bullseye/main arm64 Packages
                                              100 /var/lib/dpkg/status
                                           12.22.12~dfsg-1~deb11u3 500
                                              500 http://security.debian.org/debian-security bullseye-security/main arm64 Packages
                                           12.22.5~dfsg-2~11u1 500
                                              500 http://deb.debian.org/debian bullseye/main arm64 Packages
                                      

                                      which nodejs node npm && nodejs -v && node -v && npm -v && apt policy nodejs

                                      ergibt

                                      /usr/bin/nodejs
                                      /usr/bin/node
                                      /usr/bin/npm
                                      v16.19.1
                                      v16.19.1
                                      8.19.3
                                      nodejs:
                                        Installed: 16.19.1-deb-1nodesource1
                                        Candidate: 16.19.1-deb-1nodesource1
                                        Version table:
                                       *** 16.19.1-deb-1nodesource1 500
                                              500 https://deb.nodesource.com/node_16.x bullseye/main arm64 Packages
                                              100 /var/lib/dpkg/status
                                           12.22.12~dfsg-1~deb11u3 500
                                              500 http://security.debian.org/debian-security bullseye-security/main arm64 Packages
                                           12.22.5~dfsg-2~11u1 500
                                              500 http://deb.debian.org/debian bullseye/main arm64 Packages
                                      

                                      sudo nano /etc/apt/sources.list.d/nodesource.list

                                      deb [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_16.x bullseye main
                                      deb-src [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_16.x bullseye main
                                      

                                      Was ist der empfohlene Prozess um ein neuerliches Upgrade auf 18 zu probieren?

                                      cd /opt/iobroker
                                      iobroker stop
                                      iobroker backup
                                      sudo apt-get purge nodejs -y && sudo apt-get autoremove -y && sudo apt-get autoclean -y
                                      sudo curl -sL https://deb.nodesource.com/setup_18.x | sudo bash -
                                      sudo apt-get install -y nodejs
                                      curl -sL https://iobroker.net/fix.sh | bash -
                                      iobroker start
                                      

                                      Habs so gemacht bei 18 und dann auch jetzt beim Downgrade auf 16.

                                      //offtopic in welchem Intervall darf man eigentlich antworten, steht das irgendwo?
                                      (wenn ich gleich antworten will kommt ein "Error Forbidden" und ich würde mir leichter tun wenn ich wüsste wann es wieder geht)

                                      Thomas Braun Homoran 2 Replies Last reply Reply Quote 0
                                      • Thomas Braun
                                        Thomas Braun Most Active @grazer75 last edited by

                                        @grazer75 sagte in [How-to] Node.js für ioBroker richtig updaten:

                                        Eventuell einfach
                                        npm install -g npm@8

                                        ausführen?

                                        Genau mit dem Gefummel frickelst du es ja kaputt. npm/npx wird NIE separat angepackt, das liegt dem Paket 'nodejs' bereits in jeweils passender Version bei.

                                        Räum das weg:

                                        sudo rm /usr/local/bin/npx
                                        

                                        Und dann bitte nochmal

                                        iob diag
                                        

                                        laufen lassen.

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

                                          @grazer75 sagte in [How-to] Node.js für ioBroker richtig updaten:

                                          wenn ich gleich antworten will kommt ein "Error Forbidden" und ich würde mir leichter tun wenn ich wüsste wann es wieder geht)

                                          hat nix mit "gleich" zu tun, eher mit Firefox.
                                          F5 und nochmal. dann klappt es

                                          G 1 Reply Last reply Reply Quote 0
                                          • G
                                            grazer75 @Thomas Braun last edited by grazer75

                                            @thomas-braun
                                            sieht gut aus

                                            
                                            Operatingsystem:        Debian GNU/Linux 11 (bullseye)
                                            Kernel:                 6.1.21-v8+
                                            Installation:           Native
                                            Timezone:               Europe/Vienna (CEST, +0200)
                                            User-ID:                1000
                                            X-Server:               false
                                            Boot Target:            multi-user.target
                                            
                                            Pending OS-Updates:     0
                                            Pending iob updates:    0
                                            
                                            Nodejs-Installation:    /usr/bin/nodejs         v16.19.1
                                                                    /usr/bin/node           v16.19.1
                                                                    /usr/bin/npm            8.19.3
                                                                    /usr/bin/npx            8.19.3
                                            
                                            Recommended versions are nodejs 18.x.y and npm 9.x.y
                                            Your nodejs installation is correct
                                            
                                            MEMORY:
                                                           total        used        free      shared  buff/cache   available
                                            Mem:            7.8G        3.1G        3.9G        6.0M        848M        4.6G
                                            Swap:            99M          0B         99M
                                            Total:          7.9G        3.1G        4.0G
                                            
                                            Active iob-Instances:   57
                                            Active repo(s): stable
                                            
                                            ioBroker Core:          js-controller           4.0.24
                                                                    admin                   6.3.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 (SSL), run as: admin
                                            + system.adapter.web.0                    : web                   : raspberrypi                              -  enabled, port: 8082, bind: 0.0.0.0, run as: admin
                                            
                                            Objects:                29909
                                            States:                 24671
                                            
                                            Size of iob-Database:
                                            
                                            23M     /opt/iobroker/iobroker-data/objects.jsonl
                                            58M     /opt/iobroker/iobroker-data/states.jsonl
                                            
                                            

                                            auf 16 bleiben oder nochmal 18 testen?

                                            Also

                                            cd /opt/iobroker
                                            iobroker stop
                                            iobroker backup
                                            sudo apt-get purge nodejs -y && sudo apt-get autoremove -y && sudo apt-get autoclean -y
                                            sudo curl -sL https://deb.nodesource.com/setup_18.x | sudo bash -
                                            sudo apt-get install -y nodejs
                                            curl -sL https://iobroker.net/fix.sh | bash -
                                            iobroker start
                                            

                                            und wenn es wieder Fehler gibt retour auf 16

                                            cd /opt/iobroker
                                            iobroker stop
                                            iobroker backup
                                            sudo apt-get purge nodejs -y && sudo apt-get autoremove -y && sudo apt-get autoclean -y
                                            sudo curl -sL https://deb.nodesource.com/setup_16.x | sudo bash -
                                            sudo apt-get install -y nodejs
                                            curl -sL https://iobroker.net/fix.sh | bash -
                                            iobroker start
                                            

                                            oder lieber so lassen wenn alles mit 16.x funktioniert aktuell.

                                            Thomas Braun 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            Support us

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

                                            891
                                            Online

                                            31.6k
                                            Users

                                            79.4k
                                            Topics

                                            1.3m
                                            Posts

                                            installation linux node node.js nodejs windows
                                            106
                                            1105
                                            618002
                                            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