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

    • ioBroker goes Matter ... Matter Adapter in Stable

    • 15. 05. Wartungsarbeiten am ioBroker Forum

    • Monatsrückblick - April 2025

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

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

      Hi. irgendwie komme ich nicht auf node.js 18.16.0

      Ich mache " curl -sL https://deb.nodesource.com/setup_18.x | sudo -E bash -"
      Danach "sudo apt-get install -y nodejs`"

      Es ist zwar dann 18.16.0 installiert. Aber wenn ich "node -v" eingebe, dann sagt er 16.19.0

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

        @atifan

        Wie immer:
        Keine Screenshots aus der Konsole.

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

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

          @atifan

          Wie immer:
          Keine Screenshots aus der Konsole.

          Hm, wieso das denn? Ist das verboten? Wusste ich nicht. Aber wieso keine Screens von Console?

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

            @atifan

            Weil man die nicht immer lesen kann, man nicht daraus kopieren kann, der Text als Bild nicht von der Suchfunktion erfasst werden kann, ein Bild fetter ist als der reine Text, usw...

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

              @atifan

              Kannste jetzt gleich mit der Ausgabe zu

              sudo ln -s /usr/bin/node /usr/bin/nodejs &> /dev/null
              
              uname -m && type -P nodejs node npm npx && nodejs -v && node -v && npm -v && npx -v && iob -v && whoami && groups && echo $XDG_SESSION_TYPE && pwd && sudo apt update &> /dev/null && sudo apt update && apt policy nodejs
              
              

              üben. Ich vermute aber stark, dass da die Pfade falsch sein werden.

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

                OK 🙂 Dann hier meine Console als Code.

                iobroker@iobroker:~$ node -v
                v16.19.0
                iobroker@iobroker:~$ curl -sL https://deb.nodesource.com/setup_18.x | sudo -E bash
                
                ## Installing the NodeSource Node.js 18.x repo...
                
                
                ## Populating apt-get cache...
                
                + apt-get update
                Hit:1 http://ftp.debian.org/debian bullseye InRelease
                Hit:2 http://security.debian.org bullseye-security InRelease
                Hit:3 http://ftp.debian.org/debian bullseye-updates InRelease
                Hit:4 https://deb.nodesource.com/node_18.x bullseye InRelease
                Hit:5 https://dl.yarnpkg.com/debian stable InRelease
                Reading package lists... Done
                
                ## Confirming "bullseye" is supported...
                
                + curl -sLf -o /dev/null 'https://deb.nodesource.com/node_18.x/dists/bullseye/Release'
                
                ## Adding the NodeSource signing key to your keyring...
                
                + curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | gpg --dearmor | tee /usr/share/keyrings/nodesource.gpg >/dev/null
                
                ## Creating apt sources list file for the NodeSource Node.js 18.x repo...
                
                + echo 'deb [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x bullseye main' > /etc/apt/sources.list.d/nodesource.list
                + echo 'deb-src [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x bullseye main' >> /etc/apt/sources.list.d/nodesource.list
                
                ## Running `apt-get update` for you...
                
                + apt-get update
                Hit:1 http://security.debian.org bullseye-security InRelease
                Hit:2 http://ftp.debian.org/debian bullseye InRelease
                Hit:3 https://deb.nodesource.com/node_18.x bullseye InRelease
                Hit:4 http://ftp.debian.org/debian bullseye-updates InRelease
                Hit:5 https://dl.yarnpkg.com/debian stable InRelease
                Reading package lists... Done
                
                ## Run `sudo apt-get install -y nodejs` to install Node.js 18.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 | gpg --dearmor | sudo tee /usr/share/keyrings/yarnkey.gpg >/dev/null
                     echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] 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
                
                
                iobroker@iobroker:~$ sudo apt-get install -y nodejs
                Reading package lists... Done
                Building dependency tree... Done
                Reading state information... Done
                nodejs is already the newest version (18.16.0-deb-1nodesource1).
                0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
                iobroker@iobroker:~$ node -v
                v16.19.0
                iobroker@iobroker:~$
                
                
                Thomas Braun crunchip 2 Replies Last reply Reply Quote 0
                • Thomas Braun
                  Thomas Braun Most Active @Atifan last edited by

                  @atifan

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

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

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

                    @atifan

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

                    OK Danke probiere ich mal.
                    Das hier spuckt er aus wenn ich oben das mache was du geschrieben hattest.

                    iobroker@iobroker:~$ sudo ln -s /usr/bin/node /usr/bin/nodejs &> /dev/null
                    iobroker@iobroker:~$ uname -m && type -P nodejs node npm npx && nodejs -v && node -v && npm -v && npx -v && iob -v && whoami && groups && echo $XDG_SESSION_TYPE && pwd && sudo apt update &> /dev/null && sudo apt update && apt policy nodejs
                    x86_64
                    /usr/bin/nodejs
                    /usr/local/bin/node
                    /usr/local/bin/npm
                    /usr/local/bin/npx
                    v18.16.0
                    v16.19.0
                    8.19.3
                    8.19.3
                    4.0.24
                    iobroker
                    iobroker tty dialout audio video
                    tty
                    /home/iobroker
                    Hit:1 http://ftp.debian.org/debian bullseye InRelease
                    Hit:2 http://security.debian.org bullseye-security InRelease
                    Hit:3 http://ftp.debian.org/debian bullseye-updates InRelease
                    Hit:4 https://deb.nodesource.com/node_18.x bullseye InRelease
                    Hit:5 https://dl.yarnpkg.com/debian stable 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 amd64 Packages
                            100 /var/lib/dpkg/status
                         12.22.12~dfsg-1~deb11u3 500
                            500 http://security.debian.org bullseye-security/main amd64 Packages
                         12.22.5~dfsg-2~11u1 500
                            500 http://ftp.debian.org/debian bullseye/main amd64 Packages
                    iobroker@iobroker:~$
                    
                    
                    Thomas Braun 1 Reply Last reply Reply Quote 0
                    • crunchip
                      crunchip Forum Testing Most Active @Atifan last edited by

                      @atifan und leg dir vllt nen neuen user an, der nicht gleich lautet wie der systeminterne iobroker

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

                        @atifan

                        Wie vorhergesagt: Falsche Pfade.
                        v16.19.0 hast du also irgendwie am Paketmanager vorbei in das System geschraubt.

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

                          Hi Danke für Eure Hilfe. Habe es nach der Anleitung hinbekommen, habe die Ordner wie in Anleitung gelöscht und danach gings 🙂
                          Aber keine Ahnung wieso da was falsch war.
                          Ich mache eig. immer nach der Anleitung die Updates.
                          Aber egal, funktioniert wieder, Danke 🙂

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

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

                            Aber keine Ahnung wieso da was falsch war.

                            Weil die v16.19.0 von dir irgendwie anders draufgeklatscht worden ist.
                            Eine ordentliche Installation über deinen Paketmanager landet nicht in /usr/local/bin

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

                              @atifan

                              Zeig mal die Ausgabe von

                              iob diag
                              

                              Zusammenfassung reicht.

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

                                ======================= SUMMARY =======================
                                                     v.2023-04-16
                                
                                
                                Operatingsystem:        Debian GNU/Linux 11 (bullseye)
                                Kernel:                 5.15.104-1-pve
                                Installation:           lxc
                                Timezone:               Europe/Berlin (CEST, +0200)
                                User-ID:                1000
                                X-Server:               false
                                Boot Target:            graphical.target
                                
                                Pending OS-Updates:     0
                                Pending iob updates:    0
                                
                                Nodejs-Installation:    /usr/bin/nodejs         v18.16.0
                                                        /usr/bin/node           v18.16.0
                                                        /usr/bin/npm            9.5.1
                                                        /usr/bin/npx            9.5.1
                                
                                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:            4.1G        2.4G        1.2G        0.0K        549M        1.7G
                                Swap:             0B          0B          0B
                                Total:          4.1G        2.4G        1.2G
                                
                                Active iob-Instances:   36
                                Active repo(s): beta
                                
                                ioBroker Core:          js-controller           4.0.24
                                                        admin                   6.4.3
                                
                                ioBroker Status:        iobroker is running on this host.
                                
                                
                                Objects type: jsonl
                                States  type: jsonl
                                
                                Status admin and web instance:
                                + system.adapter.admin.0                  : admin                 : iobroker                                 -  enabled, port: 8081, bind: 0.0.0.0, run as: admin
                                + system.adapter.web.0                    : web                   : iobroker                                 -  enabled, port: 8082, bind: 0.0.0.0, run as: admin
                                
                                Objects:                14041
                                States:                 18902
                                
                                Size of iob-Database:
                                
                                19M     /opt/iobroker/iobroker-data/objects.jsonl
                                11M     /opt/iobroker/iobroker-data/states.jsonl
                                
                                
                                
                                =================== END OF SUMMARY ====================
                                
                                1 Reply Last reply Reply Quote 0
                                • Romano Drews
                                  Romano Drews @Stabilostick last edited by Romano Drews

                                  @stabilostick

                                  Ich habe nach der Ausführung der Anleitung leider mein iobroker zerlegt und erreiche diesen nicht mehr.

                                  Bedauerlicherweise bin ich nicht so der Liebhaber Putty und Co.

                                  Ich habe folgende Meldung:

                                  pi@raspberrypi:/opt/iobroker $ iob fix
                                  library: loaded
                                  Library version=2022-12-09
                                  ioBroker is not installed in /opt/iobroker! Cannot fix anything...
                                  pi@raspberrypi:/opt/iobroker $ iob install
                                  node:internal/modules/cjs/loader:1080
                                    throw err;
                                    ^
                                  
                                  Error: Cannot find module '/opt/iobroker/node_modules/iobroker.js-controller/iobroker.js'
                                      at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15)
                                      at Module._load (node:internal/modules/cjs/loader:922:27)
                                      at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
                                      at node:internal/main/run_main_module:23:47 {
                                    code: 'MODULE_NOT_FOUND',
                                    requireStack: []
                                  }
                                  
                                  Node.js v18.17.1
                                  pi@raspberrypi:/opt/iobroker $
                                  
                                  

                                  Ein Backup habe ich zuvor von IO Broker gemacht, bevor ich mit der Anleitung angefangen habe.

                                  Also wie auch in der Anleitung hier beschrieben habe ich dafür:

                                  iobroker backup
                                  

                                  verwendet.

                                  Ich würde mich freuen, wenn mir jemand von euch ein wenig unter die Arme greifen kann, um meine IO Broker Installation wieder herzustellen, sodass alles wieder läuft.

                                  Ich bin über Google auf den Beitrag hier gekommen, da ich durch IO Broker gezwungen wurde an Node herumzuspielen.
                                  Das ging ungünstigerweise schief und ich habe leider zu wenig Ahnung, um das allein wieder hinzubekommen.

                                  crunchip Homoran 3 Replies Last reply Reply Quote 0
                                  • crunchip
                                    crunchip Forum Testing Most Active @Romano Drews last edited by

                                    @romano-drews kurz um, wenn du wirklich ein funktionierendes backup hast, installiere dein OS 64bit ohne Desktop neu, mit dem Einzeiler iobroker und anschließend dein Backup einspielen.
                                    schau da mal nach, da findest du alles
                                    https://forum.iobroker.net/user/thomas-braun
                                    bzw direkt hier
                                    https://forum.iobroker.net/topic/51869/installation-auf-raspi-einfacher-geht-s-nicht?_=1692846419216

                                    Romano Drews 1 Reply Last reply Reply Quote 0
                                    • Romano Drews
                                      Romano Drews @crunchip last edited by

                                      Danke für die Rückmeldung

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

                                      wenn du wirklich ein funktionierendes backup hast, installiere dein OS 64bit ohne Desktop neu

                                      Das Backup habe ich ja vorher mit dem Befehl erstellt.
                                      In welchem Verzeichnis finde ich das jetzt?

                                      Ist auch nicht das erste Mal, dass ich mit dem Befehl ein IO Broker Backup gemacht habe.
                                      Da wo die Backups also hingehen sollte, auch eins liegen ^^ weiß nur nicht wo.

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

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

                                        @stabilostick
                                        Ich habe nach der Ausführung der Anleitung

                                        dass diese Anleitung von 2019 ist und nicht mehr unbedingt auf heitige Systeme passen muss hast du schon erkannt?

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

                                        mein iobroker zerlegt

                                        bedeutet was?

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

                                        da ich durch IO Broker gezwungen wurde an Node herumzuspielen.

                                        in welcher Form zwingt iobroker dich an node "herumzuspielen"?
                                        was genau bedeutet das?

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

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

                                          In welchem Verzeichnis finde ich das jetzt?

                                          da wo es hingehört 😉 /opt/iobroker/backups/

                                          1 Reply Last reply Reply Quote 0
                                          • crunchip
                                            crunchip Forum Testing Most Active @Romano Drews last edited by crunchip

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

                                            Ich bin über Google auf den Beitrag hier gekommen

                                            vllt öfter mal im Forum mitlesen

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

                                            dass diese Anleitung von 2019 ist

                                            selbst das hier sollte eigentlich jeder finden
                                            72ee40ab-e0b1-44a7-a35f-99c587444024-image.png
                                            wenn man nodejs updaten muss

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

                                            um meine IO Broker Installation wieder herzustellen

                                            kannst du auch mal mit folgendem Befehl versuchen

                                            cd /opt/iobroker
                                            sudo -H -u iobroker npm install iobroker.js-controller
                                            

                                            falls das klappt, danach

                                            iob diag
                                            
                                            Romano Drews 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

                                            1.0k
                                            Online

                                            31.6k
                                            Users

                                            79.5k
                                            Topics

                                            1.3m
                                            Posts

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