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.
    • S
      SolarGuido last edited by

      Jetzt wird es richtig wuschelig mit der js8 Version. Ich überlege auch upgrade auf js12 zu machen, wie sieht es damit aus? Gibt es dazu auch eine Anleitung? Gibt es für NPM auch dann eine Notwendigkeit diese upzugraden?
      Danke für jeden Hinweis!

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

        @SolarGuido Hängt vom verwendeten System ab.
        Grundsätzlich: Siehe den ersten Beitrag in diesem Thread.

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

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

          wie sieht es damit aus? Gibt es dazu auch eine Anleitung?

          Die Anleitung ist identisch, nur dass du die 10.x in dem Befehl gegen eine 12.x austauschen musst.

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

          Gibt es für NPM auch dann eine Notwendigkeit diese upzugraden?

          Das wird automatisch mit ugegradet

          S 1 Reply Last reply Reply Quote 0
          • S
            SolarGuido @Thomas Braun last edited by SolarGuido

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

            rwendeten System ab.

            Orange Pi (image aus dem Forum) Also Debian

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

              @SolarGuido Da läuft ein Linux drauf? Debian?

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

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

                Da läuft ein Linux drauf? Debian?

                Armbian

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

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

                  ass du die 10.x in dem Befehl gegen eine 12.x austauschen mu

                  Ok, dann vielen Dank!

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

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

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

                    Da läuft ein Linux drauf? Debian?

                    Armbian

                    Ja , aber Debian ist glaub ich die Basis dafür , nur das Armbian eingeschränkt ist gegenüber Deban...

                    Ich werde es probieren mache ne Ordner Sicherung vorher, da werden doch nur Änderungen in opt/iobroker gemacht oder auch andere Verzeichnisse?

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

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

                      Ja , aber Debian ist glaub ich die Basis dafür , nur das Armbian eingeschränkt ist gegenüber Deban...

                      Naja, ist ein für ARM Hardware optimiertes Debian.

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

                        @Homoran

                        da werden doch nur Änderungen in opt/iobroker gemacht oder auch andere Verzeichnisse??
                        Also nur das Verzeichnis sichern, damit wenn es schief läuft ich wieder auf Start komme, richtig?

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

                          @SolarGuido Nein, da wird node.js upgedated und danach über npm rebuild die Pakete von ioBroker neu kompiliert

                          Es betrifft ggf. mehr als ioB
                          Aber Backup von ioB mit backitup ist immer eine gute Basis für einen neuanfang

                          S 2 Replies Last reply Reply Quote 0
                          • S
                            SolarGuido @Homoran last edited by

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

                            wird node.js upgedated und danach über npm rebuild die Pakete von ioBroker neu kompiliert

                            ok, danke für die Auskunft

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

                              @Homoran

                              ich habe es ja fast befürchtet:

                              root@ioBroker-OPiplus2e:/opt/iobroker# curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
                              
                              ## Installing the NodeSource Node.js 12.x repo...
                              
                              
                              ## Populating apt-get cache...
                              
                              + apt-get update
                              Ign:1 http://httpredir.debian.org/debian stretch InRelease
                              OK:2 http://security.debian.org stretch/updates InRelease
                              OK:3 http://httpredir.debian.org/debian stretch-updates InRelease
                              OK:4 http://httpredir.debian.org/debian stretch-backports InRelease
                              OK:5 http://ppa.launchpad.net/linuxuprising/java/ubuntu bionic InRelease
                              OK:6 http://httpredir.debian.org/debian stretch Release
                              OK:7 http://ppa.launchpad.net/linuxuprising/java/ubuntu disco InRelease
                              OK:9 http://ppa.launchpad.net/openjdk-r/ppa/ubuntu disco InRelease
                              OK:10 https://deb.nodesource.com/node_12.x stretch InRelease
                              OK:8 https://apt.armbian.com stretch InRelease
                              Ign:11 https://download.webmin.com/download/repository sarge InRelease
                              OK:12 https://download.webmin.com/download/repository sarge Release
                              Paketlisten werden gelesen... Fertig
                              
                              ## Confirming "stretch" is supported...
                              
                              + curl -sLf -o /dev/null 'https://deb.nodesource.com/node_12.x/dists/stretch/Release'
                              
                              ## Adding the NodeSource signing key to your keyring...
                              
                              + curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -
                              OK
                              
                              ## Creating apt sources list file for the NodeSource Node.js 12.x repo...
                              
                              + echo 'deb https://deb.nodesource.com/node_12.x stretch main' > /etc/apt/sources.list.d/nodesource.list
                              + echo 'deb-src https://deb.nodesource.com/node_12.x stretch main' >> /etc/apt/sources.list.d/nodesource.list
                              
                              ## Running `apt-get update` for you...
                              
                              + apt-get update
                              OK:1 http://security.debian.org stretch/updates InRelease
                              Ign:2 http://httpredir.debian.org/debian stretch InRelease
                              OK:3 http://httpredir.debian.org/debian stretch-updates InRelease
                              OK:4 http://httpredir.debian.org/debian stretch-backports InRelease
                              OK:5 http://ppa.launchpad.net/linuxuprising/java/ubuntu bionic InRelease
                              OK:6 http://httpredir.debian.org/debian stretch Release
                              OK:8 http://ppa.launchpad.net/linuxuprising/java/ubuntu disco InRelease
                              OK:9 http://ppa.launchpad.net/openjdk-r/ppa/ubuntu disco InRelease
                              OK:10 https://deb.nodesource.com/node_12.x stretch InRelease
                              OK:7 https://apt.armbian.com stretch InRelease
                              Ign:11 https://download.webmin.com/download/repository sarge InRelease
                              OK:12 https://download.webmin.com/download/repository sarge Release
                              Paketlisten werden gelesen... Fertig
                              
                              ## Run `sudo apt-get install -y nodejs` to install Node.js 12.x and npm
                              ## You may also need development tools to build native addons:
                                   sudo apt-get install gcc g++ make
                              ## To install the Yarn package manager, run:
                                   curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
                                   echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
                                   sudo apt-get update && sudo apt-get install yarn
                              
                              
                              root@ioBroker-OPiplus2e:/opt/iobroker# sudo apt-get install -y nodejs
                              Paketlisten werden gelesen... Fertig
                              Abhängigkeitsbaum wird aufgebaut.
                              Statusinformationen werden eingelesen.... Fertig
                              Die folgenden NEUEN Pakete werden installiert:
                                nodejs
                              0 aktualisiert, 1 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.
                              Es müssen noch 0 B von 15,9 MB an Archiven heruntergeladen werden.
                              Nach dieser Operation werden 83,7 MB Plattenplatz zusätzlich benutzt.
                              Vormals nicht ausgewähltes Paket nodejs wird gewählt.
                              (Lese Datenbank ... 75054 Dateien und Verzeichnisse sind derzeit installiert.)
                              Vorbereitung zum Entpacken von .../nodejs_12.16.2-1nodesource1_armhf.deb ...
                              Entpacken von nodejs (12.16.2-1nodesource1) ...
                              nodejs (12.16.2-1nodesource1) wird eingerichtet ...
                              Trigger für man-db (2.7.6.1-2) werden verarbeitet ...
                              root@ioBroker-OPiplus2e:/opt/iobroker# node -v
                              v8.16.0
                              
                              

                              ich hab auch :

                              sudo apt-get --purge remove node
                              
                              sudo apt-get --purge remove nodejs
                              
                              sudo apt-get autoremove
                              
                              sudo reboot
                              

                              hat auch nix gebracht bringt immer wieder bei node -v die 8.16.0
                              das komische, er sagt keine Installation gefunden...

                              starte ich iobroker:

                              Plattform: linux
                              Betriebssystem: linux
                              Die Architektur: arm
                              CPUs: 4
                              Geschwindigkeit: 1296 MHz
                              Modell: ARMv7 Processor rev 5 (v7l)
                              RAM: 1.9 GB
                              System-Betriebszeit: 00:20:32
                              Node.js: v8.16.0
                              Datenträgergröße: 14.1 GiB
                              Datenträger verfügbar: 7.2 GiB
                              Adapter-Anzahl: 345
                              NPM: v6.4.1
                              Betriebszeit: 00:00:30
                              Aktive Instanzen: 7 (war gerade am starten außer java braucht ja 10 minimum) läuft alles ...
                              
                              root@ioBroker-OPiplus2e:/opt/iobroker# sudo apt-get install -y nodejs
                              Paketlisten werden gelesen... Fertig
                              Abhängigkeitsbaum wird aufgebaut.
                              Statusinformationen werden eingelesen.... Fertig
                              nodejs ist schon die neueste Version (12.16.2-1nodesource1).
                              0 aktualisiert, 0 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.
                              
                              root@ioBroker-OPiplus2e:/opt/iobroker# node -v
                              v8.16.0
                              root@ioBroker-OPiplus2e:/opt/iobroker# ^C
                              root@ioBroker-OPiplus2e:/opt/iobroker# nodejs -v
                              v12.16.2
                              root@ioBroker-OPiplus2e:/opt/iobroker# npm -v
                              6.4.1
                              
                              
                              

                              LoL

                              eine Idee was ich machen kann?

                              S 1 Reply Last reply Reply Quote 0
                              • S
                                SolarGuido @SolarGuido last edited by SolarGuido

                                ich habs:

                                To manually remove node js, npm and node_modules from Ubuntu, you need to do the following steps.
                                
                                First of all you need to run the following command from command terminal as sudo.
                                sudo rm -rf /usr/local/bin/npm /usr/local/share/man/man1/node* /usr/local/lib/dtrace/node.d ~/.npm ~/.node-gyp /opt/local/bin/node opt/local/include/node /opt/local/lib/node_modules
                                
                                Remove node or node_modules directories from /usr/local/lib with the help of following command.
                                sudo rm -rf /usr/local/lib/node*
                                
                                Remove node or node_modules directories from /usr/local/include with the help of following command.
                                sudo rm -rf /usr/local/include/node*
                                
                                Remove any node file or dir from /usr/local/bin with the help of following command.
                                sudo rm -rf /usr/local/bin/node*
                                
                                Go to home directory and remove any node or node_modules directory, if exists.
                                Now it is done
                                

                                und danach neu starten (habe opt/iobroker sicherheitshalber kurz umbenannt beim Neustart)

                                danach

                                root@ioBroker-OPiplus2e:/opt/iobroker# curl -sL https://deb.nodesource.com/setup                                                                                                                                                             _12.x | sudo -E bash -
                                
                                ## Installing the NodeSource Node.js 12.x repo...
                                
                                
                                ## Populating apt-get cache...
                                
                                + apt-get update
                                OK:1 http://security.debian.org stretch/updates InRelease
                                Ign:2 http://httpredir.debian.org/debian stretch InRelease
                                OK:3 http://httpredir.debian.org/debian stretch-updates InRelease
                                OK:4 http://ppa.launchpad.net/linuxuprising/java/ubuntu bionic InRelease
                                OK:5 http://httpredir.debian.org/debian stretch-backports InRelease
                                OK:7 http://httpredir.debian.org/debian stretch Release
                                OK:8 http://ppa.launchpad.net/linuxuprising/java/ubuntu disco InRelease
                                OK:9 http://ppa.launchpad.net/openjdk-r/ppa/ubuntu disco InRelease
                                OK:10 https://deb.nodesource.com/node_12.x stretch InRelease
                                OK:6 https://apt.armbian.com stretch InRelease
                                Ign:11 https://download.webmin.com/download/repository sarge InRelease
                                OK:12 https://download.webmin.com/download/repository sarge Release
                                Paketlisten werden gelesen... Fertig
                                
                                ## Confirming "stretch" is supported...
                                
                                + curl -sLf -o /dev/null 'https://deb.nodesource.com/node_12.x/dists/stretch/Rel                                                                                                                                                             ease'
                                
                                ## Adding the NodeSource signing key to your keyring...
                                
                                + curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -
                                OK
                                
                                ## Creating apt sources list file for the NodeSource Node.js 12.x repo...
                                
                                + echo 'deb https://deb.nodesource.com/node_12.x stretch main' > /etc/apt/source                                                                                                                                                             s.list.d/nodesource.list
                                + echo 'deb-src https://deb.nodesource.com/node_12.x stretch main' >> /etc/apt/s                                                                                                                                                             ources.list.d/nodesource.list
                                
                                ## Running `apt-get update` for you...
                                
                                + apt-get update
                                Ign:1 http://httpredir.debian.org/debian stretch InRelease
                                OK:2 http://security.debian.org stretch/updates InRelease
                                OK:3 http://httpredir.debian.org/debian stretch-updates InRelease
                                OK:4 http://httpredir.debian.org/debian stretch-backports InRelease
                                OK:5 http://ppa.launchpad.net/linuxuprising/java/ubuntu bionic InRelease
                                OK:7 http://httpredir.debian.org/debian stretch Release
                                OK:8 http://ppa.launchpad.net/linuxuprising/java/ubuntu disco InRelease
                                OK:9 http://ppa.launchpad.net/openjdk-r/ppa/ubuntu disco InRelease
                                OK:10 https://deb.nodesource.com/node_12.x stretch InRelease
                                OK:6 https://apt.armbian.com stretch InRelease
                                Ign:11 https://download.webmin.com/download/repository sarge InRelease
                                OK:12 https://download.webmin.com/download/repository sarge Release
                                Paketlisten werden gelesen... Fertig
                                
                                ## Run `sudo apt-get install -y nodejs` to install Node.js 12.x and npm
                                ## You may also need development tools to build native addons:
                                     sudo apt-get install gcc g++ make
                                ## To install the Yarn package manager, run:
                                     curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
                                     echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/s                                                                                                                                                             ources.list.d/yarn.list
                                     sudo apt-get update && sudo apt-get install yarn
                                
                                
                                root@ioBroker-OPiplus2e:/opt/iobroker# sudo apt-get install -y nodejs
                                Paketlisten werden gelesen... Fertig
                                Abhängigkeitsbaum wird aufgebaut.
                                Statusinformationen werden eingelesen.... Fertig
                                Die folgenden NEUEN Pakete werden installiert:
                                  nodejs
                                0 aktualisiert, 1 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.
                                Es müssen noch 0 B von 15,9 MB an Archiven heruntergeladen werden.
                                Nach dieser Operation werden 83,7 MB Plattenplatz zusätzlich benutzt.
                                Vormals nicht ausgewähltes Paket nodejs wird gewählt.
                                (Lese Datenbank ... 75054 Dateien und Verzeichnisse sind derzeit installiert.)
                                Vorbereitung zum Entpacken von .../nodejs_12.16.2-1nodesource1_armhf.deb ...
                                Entpacken von nodejs (12.16.2-1nodesource1) ...
                                nodejs (12.16.2-1nodesource1) wird eingerichtet ...
                                Trigger für man-db (2.7.6.1-2) werden verarbeitet ...
                                root@ioBroker-OPiplus2e:/opt/iobroker# node -v
                                v12.16.2
                                
                                

                                hat geklappt.

                                da NPM rebuild nicht lief hab ich dann "node reinstall.js" gestartet. In der Anleitung ist es nicht deutlich, habe es im Forum gefunden. Eventuell in der Anleitung erwähnen, nur ein Hinweis...
                                Nur ist das auch auf Fehler ...

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

                                  @SolarGuido Merkwürdige Zusammenstellung in den sources hast du... disco stretch sarge... Das passt hinten und vorne nicht zueinander.

                                  S 1 Reply Last reply Reply Quote 0
                                  • S
                                    SolarGuido @Thomas Braun last edited by SolarGuido

                                    @Thomas-Braun

                                    das ist ja armbian, in erster line Stretch, das webmin sarge keine ahnung läuft schon immer und one fehler dürfte aber damit nix zu tun haben.

                                    Ich hab jetzt iobroker komplett neu installieren müssen. ist das korrekt das da nur npm 6 läuft?

                                    Habe jetzt die alte iobroker-data rein kopiert nur verstehe ich das in der Anleitung nicht da steht :

                                    Anschließend wieder ioBroker starten. Der Rest läuft dann wie bei c) und dauert seine Zeit.
                                    

                                    ok, das bedeutet nach dem start installiert er alle adapter neu , scheint zu gehen 4 sind schon installiert 🙂

                                    lattform: linux
                                    Betriebssystem: linux
                                    Die Architektur: arm
                                    CPUs: 4
                                    Geschwindigkeit: 1296 MHz
                                    Modell: ARMv7 Processor rev 5 (v7l)
                                    RAM: 1.9 GB
                                    System-Betriebszeit: 02:26:04
                                    Node.js: v12.16.2
                                    NPM: 6.14.4
                                    Datenträgergröße: 14.1 GiB
                                    Datenträger verfügbar: 7.2 GiB
                                    Adapter-Anzahl: 345
                                    Betriebszeit: 00:06:14
                                    Aktive Instanzen: 4
                                    

                                    so sieht das jetzt aus...

                                    und alle Adapter wurden neu installiert. Alle Daten und Settings blieben erhalten und sogar Javascript läuft jetzt wieder 🙂

                                    Danach auch noch 4 Adpter update gemacht ging ohne Fehler. Alle Instanzen grün.

                                    Nur der admin2.0 Adapter ist nicht mehr da , macht aber auch nicht viel...

                                    und "iot.0 2020-04-20 02:43:06.696 warn (4995) Cannot initialize getImage: Error: Cannot find module 'sharp'"

                                    wieder mal dieser sharp den ich nicht habe...

                                    und beim iot.adapter kommt kein update bei LastFunktion; last controlled function, was schon weniger nice ist...

                                    testen muss ich morgen gehe pennen

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

                                      @SolarGuido
                                      Ich würde da dringend die ganzen Repos rauswerfen die nicht zu stretch passen. Gerade webmin kann dir grundlegende Pakete zerbröseln. Hat seinen Grund, dass z. B ubuntu webmin bei sich rausgeworfen hat.

                                      S 1 Reply Last reply Reply Quote 0
                                      • S
                                        SolarGuido @Thomas Braun last edited by SolarGuido

                                        @Thomas-Braun

                                        ok danke für den tip, verstehe auch nicht warum da sarge drin ist...

                                        habe es gerade mal nach geuckt die unterscheiden wohl nicht nach irgend einer debian version. Webmin bietet nur das eine an. Es gibt auch nur eine version für alle debian vesionen. Scheint also ok zu sei läuft auch schon seit 2 Jahren ohne probleme.

                                        ja ich arbeitet auch mit putty , aber ich mag webmin trotzdem für einige Dinge sehr komfortable

                                        1 Reply Last reply Reply Quote 0
                                        • S
                                          SolarGuido last edited by

                                          Es läuft alles jetzt. Der IOT Adapter macht irgendwie nix mehr in

                                          lastCommand	
                                          state
                                          Last command
                                          
                                          lastFunction	
                                          state
                                          Last controlled function
                                          state	
                                          
                                          lastResponse	
                                          state
                                          
                                          Last textual response
                                          state	
                                          
                                          

                                          hab jetzt meine betroffenen Scripte auf Alexa History umgestellt. Das hat wohl auch nix mit nodejs zu tun. Ich hab den iot mal downgrade gemacht bis 3er version, hilft nix. denke das ist ein grundsätzliches problem.

                                          Anonsten scheint alles zu laufen, hab mal das log gecheckt und einiges getestet. bisher nix negativ aufgefallen.

                                          Ich gaube auch der Weg neue Installation iobroker, danach den data ordner austauschen , dann neu starten und warten, ist am saubersten.

                                          Jedenfalls Danke für die unterstützung

                                          1 Reply Last reply Reply Quote 0
                                          • H
                                            Hc-Yami last edited by

                                            Die Anleitung oben sucht noch nach node.js Versionen 10. Das müsste noch auf 12. geändert werden da der Info Adapter ja nun eine 12er Version empfiehlt. 🙂

                                            Homoran 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

                                            602
                                            Online

                                            31.6k
                                            Users

                                            79.4k
                                            Topics

                                            1.3m
                                            Posts

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