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

      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
                                      • 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
                                            • First post
                                              Last post

                                            Support us

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

                                            945
                                            Online

                                            31.8k
                                            Users

                                            80.0k
                                            Topics

                                            1.3m
                                            Posts

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