Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. ioBroker Allgemein
    4. Update npm und node.js

    NEWS

    • Neuer Blog: Fotos und Eindrücke aus Solingen

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

    • ioBroker goes Matter ... Matter Adapter in Stable

    Update npm und node.js

    This topic has been deleted. Only users with topic management privileges can see it.
    • Homoran
      Homoran Global Moderator Administrators last edited by

      Sorry mein Fehler, apt erst ab stretch!

      Das wird dann überall statt apt-get genommen.

      In älteren Installationen musste nach nodejs abgefragt wrden, seit v4(?) nur noch nach node.

      Über einen Symlink sollten trotzdem ältere Applikationen richtig arbeiten und werden dann zur node Installation verlinkt.

      Daher müssten bei beiden Befehlen die gleichen Versionsnummern erscheinen. Passiert dies nicht wurden zwei Versionen auf unterschiedliche Weise installiert. Oft ist bereits eine in der Distro enthalten.

      Nodejs ist ein Framework und die Grundlage auf der ioBroker programmiert ist, node ist in diesem Fall nur die kurzbezeichnung.

      npm ist der Node Package Manager, der dafür sorgt dass die Pakete und deren Abhängigkeiten richtig installiert werden. Mit jeder nodejs Installation wird auch ein npm mit installiert.

      Die geraden Versionsnummern beziehen sich auf Nodejs.

      Die komplette Anleitung ist eine komplette Neuinstallation von ioBroker und der Vorbedingungen auf einem Linux. Da es bei dir aber nur um die Korrektur der nodejs Installation ging, war für dich nur der Abschnitt Installation von nodejs relevant.

      Mit Schritt 5 hast du recht, muss ich korrigieren, bei Raspi 3 wäre das schritt 4 gewesen.

      Npm5 hätte bei allen node versionen Probleme, bei node v8 wird es aber automatisch installiert. Ab der Version 5.71 ist der Bug bei npm 5 behoben, die Installationsroutine von ioBroker wurde darauf angepasst.

      Ich selber habe (zum Testen) eigentlich alle Versionen laufen.

      Gruß Rainer

      1 Reply Last reply Reply Quote 0
      • A
        AingTii last edited by

        alles gut, jeder kann sich mal versehen.

        so ich habe erst mal geschaut was auf meinem Pi drauf ist.

        Also bei mir ist (Stretch) Versions_ID 9 installiert.

        Habe jetzt noch mal Updates und Upgrades laufen lassen

        sudo apt update
        sudo apt upgrade
        
        

        hat beides funktioniert.

        nun habe ich noch mal versucht node und nodejs zu deinstallieren

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

        Ergebnis der Abfrage

        node -v
        v9.10.1
        nodejs -v
        bash: nodejs: Kommando nicht gefunden
        
        

        heißt für mich, node ist noch drauf und ich dürfte nicht mit Schritt 4 fortfahren, wie bekomme ich das nun runter?

        ist die npm 5.6.0 schlimm oder muss ich die auch deinstallieren und neu aufspielen?

        Oder jetzt noch einfach nodejs wie unter 4. beschreiben installieren?

        4\. Node.js neu installieren für Linux und Raspberry 2/3 
          1.curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
          2.sudo apt-get install -y build-essential libavahi-compat-libdnssd-dev libudev-dev libpam0g-dev nodejs
          3.reboot
        
        

        Danke

        Gruß Jens

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

          nodejs v9 ist "böse".

          Das ist eine Entwicklerversion auf dem Weg zur stabilen v10.

          npm v5.6.0 ist ebenfalls böse, da ist ein massiver Bug drin, mit dem ioBroker komplett geschrottet werden kann.

          entweder v4.x oder >v5.7.1, aktuell v5.8

          Dies bedarf aber ggf. einer Neuinstallation

          Jetzt musst du nur noch herausbekommen, wie die v9 installiert wurde und wie die wieder wegkommt.

          ab jetzt bin ich überfragt.

          Gruß

          Rainer

          1 Reply Last reply Reply Quote 0
          • A
            AingTii last edited by

            bevor ich jetzt wieder was falsch verstehe…

            nodejs oder node V9 ist "böse"?

            Momentan ist ja node V0.x drauf

            aber nodejs nix....

            npm wäre dann der nächste schritt.

            wenn node V9.x böse, dann versuche ich tante Google mal zu quälen es deinstallieren zu können

            Gruß Jens

            1 Reply Last reply Reply Quote 0
            • A
              AingTii last edited by

              so, mit folgenden schritten habe ich node 8.9.0 installiert und die node 9.10.1 deinstalliert

              sudo n 8.9.0
              sudo shutdown -r now
              
              nach dem neustart
              sudo n rm 9.10.1
              
              

              nun sieht es wie folgt aus…

              node -v
              v8.9.0
              nodejs -v
              bash: nodejs: Kommando nicht gefunden
              npm -v
              5.5.1   (also noch böse)
              
              

              nächster schritt wäre, wie bekomme ich entweder npm 4.x oder V5.7.1 drauf

              und wie und welche nodejs muss nun drauf oder wird empfohlen?

              Danke

              Gruß Jens

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

                Nochmal zur Begriffsklärung:

                Es geht immer um nodejs

                www.nodejs.org

                lediglich die Bezeichnung der Pakete variiert.

                @AingTii:

                nächster schritt wäre, wie bekomme ich entweder npm 4.x oder V5.7.1 drauf `

                npm install -g npm@latest
                

                Gruß

                Rainer

                1 Reply Last reply Reply Quote 0
                • A
                  AingTii last edited by

                  so, npm 5.8.0 installiert mit

                  sudo npm install -g npm @latest
                  
                  npm -v
                  5.8.0
                  
                  

                  so, nodejs 8.x installiert mit

                  curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
                  sudo apt install -y build-essential libavahi-compat-libdnssd-dev libudev-dev libpam0g-dev nodejs
                  sudo reboot
                  
                  nodejs -v
                  V8.11.1
                  
                  
                  node -v
                  V8.9.0
                  
                  

                  nun noch mal update& upgrade

                  sudo apt update
                  sudo apt upgrade
                  sudo reboot
                  
                  

                  läuft soweit alles, bis auf amazondash….

                  dazu mache ich aber ein neues Thema auf....

                  Danke

                  Gruß Jens

                  1 Reply Last reply Reply Quote 0
                  • A
                    AingTii last edited by

                    so, nun noch mal grade gezogen und beide Versionen auf v8.11.1 installiert..

                    1 Reply Last reply Reply Quote 0
                    • AlCalzone
                      AlCalzone Developer last edited by

                      @AingTii:

                      nodejs -v
                      V8.11.1
                      
                      
                      node -v
                      V8.9.0
                      
                      ```` `  
                      

                      Jetzt hast du 2 Versionen, das ist gar nicht gut.

                      1 Reply Last reply Reply Quote 0
                      • A
                        AingTii last edited by

                        ne, jetzt beides 8.11.1

                        1 Reply Last reply Reply Quote 0
                        • AlCalzone
                          AlCalzone Developer last edited by

                          Hmm, dass du zwischenzeitlich 2 Versionen hattest, deutet aber auf 2 verschiedene Installationen hin. Würde ich mal beobachten - wenn es Probleme gibt, sollte man eine davon entfernen. Paul53 ist hier der Profi für solche Dinge und hat das schon mehrfach beschrieben.

                          1 Reply Last reply Reply Quote 0
                          • A
                            AingTii last edited by

                            OK, Danke

                            Also Du meinst ob wohl beide Versionen jetzt gleich sind, sind es verschiedene Installationen die

                            Probleme verurachen können?

                            Würde natürlich das Dashbutton Problem erklären können…. :roll:

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

                              Bei mir meldet iobroker.admin seit dem update immer ich müsse meine Node.js Version aktualisieren:
                              ` > Empfehlung

                              error_outlineioBroker unterstützt die LTS Versionen 6, 8, 10 oder neuer von Node.js. Bitte aktualisieren Sie die verwendete Node.js Version ("v4.5.0") auf dem Rechner "pine64" auf eine unterstützte Version. Wir empfehlen die Verwendung von Node.js 6. `

                              ich habe jetzt nach der Anleitung http://www.iobroker.net/docu/?page_id=5 … ion_Nodejs versucht das zu aktualisieren nur bin ich gerade etwas verwirrt, was die Versionen angeht.

                              Bei den Versionsabfragen bekomme ich folgende Ausgabe:

                              root@pine64:~# node -v
                              v4.5.0
                              root@pine64:~# nodejs -v
                              v6.14.3
                              root@pine64:~# npm -v
                              /usr/local/lib/node_modules/npm/bin/npm-cli.js:82
                                    let notifier = require('update-notifier')({pkg})
                                    ^^^
                              
                              SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
                                  at exports.runInThisContext (vm.js:53:16)
                                  at Module._compile (module.js:373:25)
                                  at Object.Module._extensions..js (module.js:416:10)
                                  at Module.load (module.js:343:32)
                                  at Function.Module._load (module.js:300:12)
                                  at Function.Module.runMain (module.js:441:10)
                                  at startup (node.js:139:18)
                                  at node.js:974:3
                              

                              warum wird bei node noch 4.5 angezeigt? ist das richtig so? Muss ich jetzt den reinstall ausführen?
                              ` > Bei einer bestehenden ioBroker-Installation müssen beim Wechsel der Masterversion von nodejs (4.x, 6.x, 8.x, 10.x) anschließend unbedingt die bereits installierten Adapter für diese geänderte node-Version neu kompiliert werden.

                              Dies geschieht mit dem Befehl: sudo ./reinstall.sh `

                              Gruß Maik

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

                                @MaikB85:

                                ist das richtig so? `
                                definitiv: Nein!

                                du hast, warum auch immer, anscheinend zwei verschiedene nodejs installationen auf deinem System.

                                @MaikB85:

                                Muss ich jetzt den reinstall ausführen? `
                                Nein!

                                erst muss eine (die 4.x) node-Version wieder weg.

                                Gruß

                                Rainer

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

                                  fragt sich nur wie ich die weg bekomme? ich hab eigentlich vorher laut Anleitung die Deinstallation durchgeführt. Ich mein sogar, dass er da schon kein node gefunden hatte nur nodejs. Sonst probier ich das jetzt nochmal

                                  root@pine64:~# sudo apt-get --purge remove node
                                  Reading package lists... Done
                                  Building dependency tree       
                                  Reading state information... Done
                                  Package 'node' is not installed, so not removed
                                  0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
                                  

                                  Geht so nicht 😞

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

                                    Hast du auch:

                                    sudo apt-get --purge remove nodejs
                                    

                                    durchgeführt?

                                    Gruß

                                    Rainer

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

                                      Hab ich jetzt nochmal:

                                      root@pine64:~# sudo apt-get --purge remove nodejs
                                      Reading package lists... Done
                                      Building dependency tree       
                                      Reading state information... Done
                                      The following packages will be REMOVED:
                                        nodejs*
                                      0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
                                      After this operation, 44.6 MB disk space will be freed.
                                      Do you want to continue? [Y/n] y
                                      (Reading database ... 32424 files and directories currently installed.)
                                      Removing nodejs (6.14.3-1nodesource1) ...
                                      Processing triggers for man-db (2.7.5-1) ...
                                      
                                      

                                      Dann bekomme ich für "nodejs -v" keine Rückgabe aber bei "node -v" steht immer noch 4.5

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

                                        Mach mal:

                                        which node
                                        

                                        aber dann bin ich mangels weiteren Wissens raus 😞

                                        Gruß

                                        Rainer

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

                                          @Homoran:

                                          Mach mal:

                                          which node
                                          

                                          aber dann bin ich mangels weiteren Wissens raus 😞

                                          Gruß

                                          Rainer `

                                          Dann bekomme ich den Pfad zurückgegeben: "/usr/local/bin/node"

                                          1 Reply Last reply Reply Quote 0
                                          • paul53
                                            paul53 last edited by

                                            Was ergibt ?

                                            /usr/local/bin/node -v
                                            /usr/bin/node -v
                                            ls -l /usr/local/bin/node*
                                            ls -l /usr/bin/node*
                                            
                                            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

                                            937
                                            Online

                                            31.9k
                                            Users

                                            80.2k
                                            Topics

                                            1.3m
                                            Posts

                                            23
                                            91
                                            57104
                                            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