Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. ioBroker Allgemein
    4. Diskussion zum HowTo nodejs-Installation und upgrade

    NEWS

    • [erledigt] 15. 05. Wartungsarbeiten am ioBroker Forum

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    Diskussion zum HowTo nodejs-Installation und upgrade

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

      @thomas-braun Eigentlich gerade auf neuer Hardware. Müsste ich ein neues Debian organisieren?
      ob root oder über sudo ist da doch egal zum holen der Infos, oder nicht.

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

        @nightfly1983 sagte in Diskussion zum HowTo nodejs-Installation und upgrade:

        Müsste ich ein neues Debian organisieren?

        Ja, ein für deine Prozessor-Architektur passendes. Wobei man sich glaube ich wirklich anstrengen muss, die i386-Version noch irgendwoher zu bekommen.
        Was hast du da also woher auf dein System geworfen?

        ob root oder über sudo ist da doch egal zum holen der Infos, oder nicht.

        Nein, es ist NICHT egal, weil man einfach NIE NIE NIE root wird. Nicht kurz, nicht nur mal für eine Sache, nicht weil das bequemer ist, NIE.

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

          @thomas-braun said in Diskussion zum HowTo nodejs-Installation und upgrade:

          Nein, es ist NICHT egal, weil man einfach NIE NIE NIE root wird. Nicht kurz, nicht nur mal für eine Sache, nicht weil das bequemer ist, NIE.

          Okay, verstanden 👍

          Na da zieh ich mal ein neues Debian in ner amd64 Version, müsste ja passen, und setze alles neu auf 🙈

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

            @nightfly1983 sagte in Diskussion zum HowTo nodejs-Installation und upgrade:

            müsste ja passen

            Das hängt von deinem Prozessor ab, ob das passt. Was ist denn das da jetzt für Hardware?

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

              @nightfly1983 sagte in Diskussion zum HowTo nodejs-Installation und upgrade:

              und setze alles neu auf

              Und gib dem root KEIN Passwort, auch wenn der Installer danach fragt.

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

                @thomas-braun Nen Intel i5. Werde es jetzt mal neu versuchen. Danke für die Hinweise.

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

                  Hallo Leute,

                  ich bin noch kompletter Noob und habe anhand des HowTo versucht das neue nodejs zu installieren, hat aber leider nicht geklappt. Auch nicht mit "gerade rücken" und zwar kommt folgender Fehler:

                  dpkg: Fehler beim Bearbeiten des Archivs /var/cache/apt/archives/nodejs_14.18.2-deb-1nodesource1_armhf.deb (--unpack):
                   Versuch, »/usr/share/doc/nodejs/api/fs.html« zu überschreiben, welches auch in Paket nodejs-doc 12.22.5~dfsg-2~11u1 ist
                  dpkg-deb: Fehler: »einfügen«-Unterprozess wurde durch Signal (Datenübergabe unterbrochen (broken pipe)) getötet
                  Fehler traten auf beim Bearbeiten von:
                   /var/cache/apt/archives/nodejs_14.18.2-deb-1nodesource1_armhf.deb
                  E: Sub-process /usr/bin/dpkg returned an error code (1)
                  

                  wenn ich dann die Versionen abfrage wird mur nur folgendes angezeigt:

                  /usr/bin/nodejs
                  /usr/bin/node
                  

                  mehr nicht... Nun die Frage... woran hat et jelejen?

                  Ich hoffe ich bin hier richtig und bekomme gleich keinen Ärger, dass ich hier poste.

                  Vielen Dank schonmal.

                  Gruß Martin

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

                    @mariatschi0815 sagte in Diskussion zum HowTo nodejs-Installation und upgrade:

                    woran hat et jelejen?

                    An der Installation von nodejs-doc. Das ist aus der falschen Quelle.

                    sudo apt remove node*
                    sudo apt update
                    apt policy nodejs
                    
                    Hans Schmid M 2 Replies Last reply Reply Quote 0
                    • Hans Schmid
                      Hans Schmid @Thomas Braun last edited by

                      @thomas-braun

                      Ich habe ein kleines Problem
                      ich führe wie in deinem Guide folgenden Befehl aus

                      curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
                      sudo apt install -y nodejs
                      

                      Es wird aber immer die Version 10.24 installiert.

                      pi@raspberry:~ $ which nodejs && nodejs -v && which node && node -v && which npm && npm -v && apt policy nodejs
                      /usr/bin/nodejs
                      v10.24.0
                      /usr/bin/node
                      v10.24.0
                      

                      Löschen mit den Befehlen

                      sudo apt remove nodejs*
                      sudo apt update
                      apt policy nodejs
                      

                      Und neue Installation hat auch nicht geholfen.

                      Würde mich freuen wenn du einen Tip für mich hast.

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

                        @hans-schmid

                        Bitte das ausführen, dann können wir weiter schauen.

                        sudo ln -s /usr/bin/node /usr/bin/nodejs
                        which nodejs node npm && nodejs -v && node -v && npm -v && sudo apt update && sudo apt update && apt policy nodejs
                        

                        bzw. nur

                        apt policy nodejs
                        
                        Hans Schmid 1 Reply Last reply Reply Quote 0
                        • Hans Schmid
                          Hans Schmid @Thomas Braun last edited by Hans Schmid

                          @thomas-braun

                          pi@raspberry:~ $ sudo ln -s /usr/bin/node /usr/bin/nodejs
                          ln: die symbolische Verknüpfung '/usr/bin/nodejs' konnte nicht angelegt werden: Die Datei existiert bereits
                          pi@raspberry:~ $ which nodejs node npm && nodejs -v && node -v && npm -v && sudo apt update && sudo apt update && apt policy nodejs
                          /usr/bin/nodejs
                          /usr/bin/node
                          pi@raspberry:~ $ apt policy nodejs
                          nodejs:
                            Installiert:           10.24.0~dfsg-1~deb10u1
                            Installationskandidat: 10.24.0~dfsg-1~deb10u1
                            Versionstabelle:
                           *** 10.24.0~dfsg-1~deb10u1 500
                                  500 http://ftp.debian.org/debian buster/main i386 Packages
                                  500 http://security.debian.org buster/updates/main i386 Packages
                                  100 /var/lib/dpkg/status
                          
                          

                          Wenn ich das richtig deute fragt er nicht die richtige Quelle ab !?

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

                            @hans-schmid sagte in Diskussion zum HowTo nodejs-Installation und upgrade:

                            i386

                            Du fährst da ein i386/32bit-System. Dafür wird von nodesource nicht mehr gebaut.
                            Installier ein 64bit-Betriebssystem, sofern möglich.

                            [Edit:] Ist das wirklich ein Raspberry da? Wie zur Hölle bekommt man da i386 drauf? Das ist ein ARM-System.

                            Hans Schmid 1 Reply Last reply Reply Quote 1
                            • Hans Schmid
                              Hans Schmid @Thomas Braun last edited by

                              @thomas-braun

                              Hey vielen Dank für deine schnelle Hilfe!!

                              Ne ist eine VM, ich habe dort Raspberry Pi Desktop Installiert da ich so nah wie möglich an den Pi Anleitungen bleiben wollte.
                              Wusste aber nicht das deren x86 Distri scheinbar 32Bit ist.
                              Dann installiere ich Debian, was aber leider mehr RAM braucht.

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

                                @hans-schmid sagte in Diskussion zum HowTo nodejs-Installation und upgrade:

                                Raspberry Pi Desktop

                                Die Pi Anleitungen benötigen aber nie einen Desktop. Serverdienste laufen IMMER in der Kommandozeile.

                                Wusste aber nicht das deren x86 Distri scheinbar 32Bit ist.

                                x86 ist immer 32bit. AMD64 wäre 64bit.

                                Dann installiere ich Debian, was aber leider mehr RAM braucht.

                                Ohne Desktop. Dann braucht das auch nicht mehr RAM.

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

                                  @hans-schmid sagte in Diskussion zum HowTo nodejs-Installation und upgrade:

                                  Wusste aber nicht das deren x86 Distri scheinbar 32Bit ist.

                                  Welche Distri meinst du??
                                  node wird über nodesource installiert und du wählst die Version entsprechend deiner Hardware aus.
                                  Ist diese 64Bit musst du AMD64 nehmen.
                                  x386 ist für uralte 32Bit CPUs

                                  Dann installiere ich Debian, was aber leider mehr RAM braucht.

                                  Wieso das denn?
                                  Raspbian (RaspberryPi OS) ist doch auch ein Debian

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

                                    @thomas-braun Super! Danke, jetzt läuft es!

                                    1 Reply Last reply Reply Quote 0
                                    • T
                                      ThoHilde last edited by ThoHilde

                                      Hallo,

                                      ich weiß nicht, ob ich in diesem Diskussionsfaden richtig bin mit meinem Problem. Falls nein, bitte ein kurzer Hinweis 🙂

                                      Ich komme nicht mehr auf die Admin Seite des iobrokers. Ich habe gestern 2 Adapterupdates laufen lassen, diese liefen durch.

                                      Dachte mir, ich schaue erst einmal, ob ein Update das Problem beheben kann:

                                      sudo iobroker update
                                      internal/modules/cjs/loader.js:905
                                        throw err;
                                        ^
                                      
                                      Error: Cannot find module '/opt/iobroker/node_modules/iobroker.js-controller/iobroker.js'
                                          at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15)
                                          at Function.Module._load (internal/modules/cjs/loader.js:746:27)
                                          at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)
                                          at internal/main/run_main_module.js:17:47 {
                                        code: 'MODULE_NOT_FOUND',
                                        requireStack: []
                                      }
                                      
                                      

                                      Da wurde mir dann die Fehlermeldung angezeigt.
                                      Versuchte es dann zunächst mit

                                      iobroker fix 
                                      

                                      Egebnis war das gleiche. Habe mit

                                      nodejs -v
                                      

                                      festgestellt, dass die Version 16.x installiert war. Also über die Anleitung die 14.x installiert:

                                       which nodejs node npm && nodejs -v && node -v && npm -v && whoami && sudo apt update &> /dev/null && sudo apt                                                     update && apt policy nodejs
                                      /usr/bin/nodejs
                                      /usr/bin/node
                                      /usr/bin/npm
                                      v14.18.2
                                      v14.18.2
                                      6.14.15
                                      pi
                                      Hit:1 https://www.pivccu.de/piVCCU stable InRelease
                                      Hit:2 http://archive.raspberrypi.org/debian buster InRelease
                                      Hit:3 https://packages.grafana.com/oss/deb stable InRelease
                                      Hit:4 https://repos.influxdata.com/debian buster InRelease
                                      Hit:5 http://raspbian.raspberrypi.org/raspbian buster InRelease
                                      Hit:6 https://archive.raspbian.org/raspbian buster InRelease
                                      Get:7 https://download.docker.com/linux/raspbian buster InRelease [33.6 kB]
                                      Hit:8 https://deb.nodesource.com/node_14.x buster InRelease
                                      Fetched 33.6 kB in 2s (14.2 kB/s)
                                      Reading package lists... Done
                                      Building dependency tree
                                      Reading state information... Done
                                      All packages are up to date.
                                      nodejs:
                                        Installed: 14.18.2-deb-1nodesource1
                                        Candidate: 14.18.2-deb-1nodesource1
                                        Version table:
                                       *** 14.18.2-deb-1nodesource1 500
                                              500 https://deb.nodesource.com/node_14.x buster/main armhf Packages
                                              100 /var/lib/dpkg/status
                                           10.24.0~dfsg-1~deb10u1 500
                                              500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages
                                              500 https://archive.raspbian.org/raspbian buster/main armhf Packages
                                      
                                      

                                      Anschließend nochmals iobroker fix.
                                      Geändert hat sich allerdings nichts.
                                      Was mir aufgefallen ist: beim booten wird mir der Host in der Fritzbox kurz mit dem richtigen Namen angezeigt (in meinem Fall iobroker), dann allerdings sehr schnell mit 0E_49_1C_BA_C2_15
                                      Auf dem selben RaspberryPi läuft noch eine pivCCU, diese ohne Probleme.
                                      So richtig weiß ich aktuell nicht weiter. Hat von euch wer einen Tipp/Hinweis?

                                      Grüße
                                      ThoHilde

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

                                        @thohilde

                                        cd /opt/iobroker
                                        iobroker stop
                                        sudo -H -u iobroker npm install iobroker.js-controller
                                        
                                        M 1 Reply Last reply Reply Quote 0
                                        • M
                                          Mariatschi0815 @Thomas Braun last edited by

                                          @thomas-braun hey Thomas,

                                          ich bin gerade nur Mitleser, lerne aber gerne dazu.

                                          @thomas-braun said in Diskussion zum HowTo nodejs-Installation und upgrade:

                                          @thohilde

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

                                          hier springst du ins Verzeichnis, hältst den ioBroker an und installierst als user ioBroker den js-controller, richtig? was macht das -H noch?

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

                                            @mariatschi0815

                                            -H zieht das /home-Verzeichnis des Zielusers mit.

                                            Bedeutet hier, dass z.B. das npm Log in /home/iobroker/.npm landet und nicht im ~ des aufrufenden Users.

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

                                            Support us

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

                                            778
                                            Online

                                            31.6k
                                            Users

                                            79.5k
                                            Topics

                                            1.3m
                                            Posts

                                            nodejs
                                            91
                                            844
                                            169318
                                            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