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.
    • 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
                          • Homoran
                            Homoran Global Moderator Administrators last edited by

                            Danke Paul!

                            ich hatte gerade das Forum nach diesen deinen Posts durchforstet

                            Gruß

                            Rainer

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

                              @paul53:

                              Was ergibt ?

                              /usr/local/bin/node -v
                              /usr/bin/node -v
                              ls -l /usr/local/bin/node*
                              ls -l /usr/bin/node*
                              ```` `  
                              
                              root@pine64:~# /usr/local/bin/node -v
                              v4.5.0
                              root@pine64:~# /usr/bin/node -v
                              -bash: /usr/bin/node: No such file or directory
                              root@pine64:~# ls -l /usr/local/bin/node*
                              -rwxr-xr-x 1 1001 1001 23735413 Aug 16  2016 /usr/local/bin/node
                              root@pine64:~# ls -l /usr/bin/node*
                              ls: cannot access '/usr/bin/node*': No such file or directory
                              

                              ich hab jetzt allerdings die deinstallation schon ausgeführt. Deswegen ist vielleicht das eine Verzeichnis leer. Ich könnte nochmal die 6.x installieren.

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

                                Es gibt offenbar nur eine Datei node mit Version 4.5.0. Die lösche einfach (als User root)

                                rm /usr/local/bin/node
                                npm uninstall npm -g
                                

                                und installiere die neue Version. Ich würde Version 8.x empfehlen, da Du sonst bald wieder das Problem haben wirst. Da Version 8.x aber zusammen mit NPM 5.6.0 kommt (böse !), muss <u>anschließend</u> NPM auf Version 6.x aktualisiert werden.

                                npm install -g npm@latest
                                npm -v
                                node -v
                                which node
                                ls -l /usr/bin/node* 
                                

                                Dann poste bitte die Ausgabe der letzten 4 Befehle, da wahrscheinlich noch ein Symlink erstellt werden muss, damit ioBroker beim Boot automatisch startet.

                                1 Reply Last reply Reply Quote 0
                                • Dutchman
                                  Dutchman Developer Most Active Administrators last edited by

                                  Noch als kleiner Hinweis, Installation mit root oder sudo ausführen !

                                  Sent from my iPhone using Tapatalk

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

                                    @paul53:

                                    Es gibt offenbar nur eine Datei node mit Version 4.5.0. Die lösche einfach (als User root)

                                    rm /usr/local/bin/node
                                    npm uninstall npm -g
                                    

                                    und installiere die neue Version. Ich würde Version 8.x empfehlen, da Du sonst bald wieder das Problem haben wirst. Da Version 8.x aber zusammen mit NPM 5.6.0 kommt (böse !), muss <u>anschließend</u> NPM auf Version 6.x aktualisiert werden.

                                    npm install -g npm@latest
                                    npm -v
                                    node -v
                                    which node
                                    ls -l /usr/bin/node* 
                                    

                                    Dann poste bitte die Ausgabe der letzten 4 Befehle, da wahrscheinlich noch ein Symlink erstellt werden muss, damit ioBroker beim Boot automatisch startet. `

                                    DANKE!!! Jetzt passt alles! Hier noch die Ausgaben:

                                    root@pine64:~# npm -v
                                    6.2.0
                                    root@pine64:~# node -v
                                    v8.11.3
                                    root@pine64:~# which node
                                    /usr/bin/node
                                    root@pine64:~# ls -l /usr/bin/node*
                                    -rwxr-xr-x 1 root root 27825840 Jun 13 02:27 /usr/bin/node
                                    lrwxrwxrwx 1 root root       24 Jul 16 17:29 /usr/bin/nodejs -> /etc/alternatives/nodejs
                                    root@pine64:~# nodejs -v
                                    v8.11.3
                                    
                                    

                                    Schönen Abend noch!

                                    Gruß Maik

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

                                      Da ioBroker beim automatischen Start vermutlich node im Pfad /usr/local/bin erwartet, erzeuge noch einen Symlink

                                      ln -s /usr/bin/node /usr/local/bin/node
                                      cd /opt/iobroker
                                      iobroker stop
                                      ./reinstall.sh
                                      reboot
                                      
                                      1 Reply Last reply Reply Quote 0
                                      • Blackmike
                                        Blackmike last edited by

                                        ich wäre mal interessiert in einer übersicht, gerne auch ein threat der angepinnt ist wodraud hervorgeht:

                                        welche version von node.js geht mit welcher npm version und welche sind böse

                                        also in der art node.js 4.x npm x1.y1 bis nopm x2.y2 ab js controller vx bis jscontroller vx

                                        node.js 6.0 npm x1.y1 bis npm y2.y2

                                        node.js 8.0 npm y1.y1 bis nopm x2.y2 buggy: npm u1.z1 - u2.z2

                                        die information sind, wenn sie denn aktuell sind, nur mühsam über zig threats in einigen unterforen verteilt zu finden.

                                        gruss, Black

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

                                          @Blackmike:

                                          ich wäre mal interessiert in einer übersicht, `
                                          Hallo Black,

                                          du hast recht, diese Informationen sind hier im Forum verstreut.

                                          Wir testen immer wenn etwas neues kommt und schreiben das dann auch hier - aber eben nicht konzentriert.

                                          • So etwas gehört in die Doku 😞

                                          http://www.iobroker.net/docu/?page_id=5106&lang=de#Installation_Nodejs steht immerhin das jeweils aktuelle procedere drin

                                          ABER:

                                          den aktuellen Fall, dass auf einmal (bei einigen) node 8 installiert wird, obwohl node 6 hätte installiert werden sollen war z.B. nicht vorherzusehen.

                                          Schlimmer wird es, dass es eben nicht bei allen so ist.

                                          Genauso scheint es OS-spezifische Probleme zu geben, die auch nicht "mal so eben" verifiziert und dann dokumentiert werden können.

                                          Nichtsdestoweniger werde ich diese Anregung versuchen umzusetzen.

                                          Gruß

                                          Rainer

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

                                            Auf die Gefahr hin das ich jetzt eine Beantwortete Frage doppelt stelle, bin mir einfach nicht sicher ob das jetzt ok ist oder falsch.

                                            Wenn falsch was genau soll ich machen ?! Bekomme beim Update/Upgrade immer Fehler und dachte es liegt vielleicht da dran…

                                            danke schon mal im voraus 🙂

                                            root@ioBroker:~# node -v
                                            v6.14.4
                                            root@ioBroker:~# nodejs -v
                                            v6.14.4
                                            root@ioBroker:~# npm -v
                                            3.10.10
                                            
                                            
                                            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

                                            837
                                            Online

                                            31.8k
                                            Users

                                            80.0k
                                            Topics

                                            1.3m
                                            Posts

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