Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. ioBroker Allgemein
    4. NPM Installation nach Anleitung?

    NEWS

    • Wir empfehlen: Node.js 22.x

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker goes Matter ... Matter Adapter in Stable

    NPM Installation nach Anleitung?

    This topic has been deleted. Only users with topic management privileges can see it.
    • ?
      A Former User @paul53 last edited by

      @paul53 Danke Paul!
      das hat geholfen. node und nodejs sind jetzt 10.18.1
      und npm 6.13.4

      Das hilft dann nach bei Raspian Buster Lite vom 2019-09-26
      hier: https://www.iobroker.net/docu/index-15.htm?page_id=8323&lang=de

      Installation Node.JS Punkt 6 weiter zu kommen.

      1 Reply Last reply Reply Quote 0
      • ?
        A Former User @FredF last edited by

        @FredF Danke Fred node war installiert und nach deinstallation und neuer installation hat er immer dieselbe version installiert. Siehe unten lt. Paul53 muss es wohl eine Version ohne NPM geben und die installation ist "anders" durchzuführen

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

          Das ist aber strange!

          ich habe mit dem Image vom 26.09.2019 das Pi4 Image mit iobroker gemacht.
          Da war alles ok:

          Bestandteile des Images

          Das Image enthält das Raspbian lite, basierend auf Debian 10 “Buster” vom 26.09.2019 nach download von http://www.raspberrypi.org/downloads.

          Außerdem ist seit der Veröffentlichung einige Zeit vergangen. Wenn da wirklich ein Fehler drin wäre, hätte raspberrypi.org bestimmt gehandelt.

          ? 1 Reply Last reply Reply Quote 0
          • ?
            A Former User @Homoran last edited by A Former User

            @Homoran Genau da kommt mein Image her, dass als "Fehler" zu bezeichnen, möchte ich als Newbie allerdings nicht, da ich gar nicht so genau weiß worüber wir im Detail sprechen bzw. wer da was macht etc.

            Gehe halt strickt nach Anleitung vor und da hat es halt gehackt. Vielleicht ist auch das sofortige (nach Anleitung) update/upgrade daran "Schuld"....

            Homoran paul53 2 Replies Last reply Reply Quote 0
            • Homoran
              Homoran Global Moderator Administrators @Guest last edited by

              @Pete0815 sagte in NPM Installation nach Anleitung?:

              Vielleicht ist auch das sofortige (nach Anleitung) update/upgrade daran "Schuld"....

              Das habe ich zwar auch gemacht, aber so etwas gab es IMHO früher schon, dass bei gleichem Versionsstand, node dann nicht über das node-repo sondern das Image-repo (hier raspbian - damals Ubuntu) upgedatet wird und zu diesem Problem führt.

              Ich könnte das nochmal testen (Mehr Zeit, bitte 😉 ) und sollte die Anleitung von @paul53 in die Doku mit übernehmen für alle Fälle

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

                @Pete0815 sagte:

                Vielleicht ist auch das sofortige (nach Anleitung) update/upgrade daran "Schuld"....

                Ja, vermutlich wird dabei Node.js 10.15.2 ohne npm installiert.

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

                  @Homoran sagte:

                  Ich könnte das nochmal testen

                  Du könntest mal testen, was node -v bei einem frischen, noch unveränderten Raspbian buster Image liefert. Falls dann node noch nicht vorhanden ist, sollte die Anweisung

                  sudo apt update && sudo apt upgrade
                  

                  erst nach der Installation von Node.js ausgeführt werden.

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

                    @paul53
                    Danke - werde ich machen - mein Tisch-Net-Switch hat nur im Moment keinen Port mehr frei - da hängen zu viele Testobjekte dran.

                    ? 1 Reply Last reply Reply Quote 0
                    • ?
                      A Former User @Homoran last edited by

                      @Homoran
                      Eine Neuinstallation bot sicht gerade an 😉

                      Also neues Raspian Buster Lite vom 2019-09-26 installiert und sofort die Versionen geprüft:
                      version node.JPG

                      Danach kein update/upgrade gemacht sondern sofort node.js installiert mit:

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

                      Danach wieder Versionen geprüft:
                      version node2.JPG

                      Also liegt nicht am update/upgrade und er installiert sofort 10.15.2 und kein NPM

                      Viele Grüße

                      paul53 2 Replies Last reply Reply Quote 0
                      • paul53
                        paul53 @Guest last edited by paul53

                        @Pete0815 sagte:

                        curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -

                        Raspbian buster benötigt Node.js Version 10.x.

                        1 Reply Last reply Reply Quote 0
                        • ?
                          A Former User last edited by

                          "Die momentan empfohlene Version ist node 8.x; mit js-controller 1.5.7 auch node 10.x, dann in Schritt 4.1. die “8.x” gegen 10.x” austauschen"

                          Glaube das ist anpassungsfähig

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

                            @Pete0815 Doku:

                            Die momentan empfohlene Version ist node 10.x; mit js-controller 1.5.7 auch node 8.x, dann in Schritt 4.1. die “10.x” gegen 8.x” austauschen.

                            ? 1 Reply Last reply Reply Quote 0
                            • ?
                              A Former User @paul53 last edited by

                              @paul53 https://www.iobroker.net/docu/index-15.htm?page_id=8323&lang=de
                              Dann ist die Internetseite "älter"

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

                                @Pete0815 sagte:

                                neues Raspian Buster Lite vom 2019-09-26 installiert und sofort die Versionen geprüft:

                                Mach es bitte noch einmal nach Anleitung und zuerst Node.js:

                                curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
                                sudo apt install -y nodejs
                                node -v
                                nodejs -v
                                npm -v
                                sudo apt update && sudo apt upgrade
                                sudo reboot
                                node -v
                                nodejs -v
                                npm -v
                                
                                ? 1 Reply Last reply Reply Quote 0
                                • paul53
                                  paul53 @Guest last edited by

                                  @Pete0815 sagte:

                                  Dann ist die Internetseite "älter"

                                  Ja, das ist nicht mehr die "offizielle" Doku.

                                  1 Reply Last reply Reply Quote 0
                                  • ?
                                    A Former User @paul53 last edited by A Former User

                                    @paul53 said in NPM Installation nach Anleitung?:

                                    Nach Installation

                                    curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
                                    
                                    sudo apt install -y nodejs
                                    
                                    pi@raspberrypi-IOB:~ $ node -v
                                    v10.18.1
                                    pi@raspberrypi-IOB:~ $ nodejs -v
                                    v10.18.1
                                    pi@raspberrypi-IOB:~ $ npm -v
                                    6.13.4
                                    
                                    sudo apt update && sudo apt upgrade
                                    
                                    sudo reboot
                                    
                                    pi@raspberrypi-IOB:~ $ node -v
                                    v10.18.1
                                    pi@raspberrypi-IOB:~ $ nodejs -v
                                    v10.18.1
                                    pi@raspberrypi-IOB:~ $ npm -v
                                    6.13.4
                                    

                                    Funktioniert. Problem war dann die Nutzung der alten Doku von der Internetseite. Wiese löscht man das nicht und verlinkt zu einer Quelle? Wäre doch einfacher zu pflegen?

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

                                      @Pete0815 sagte:

                                      verlinkt zu einer Quelle?

                                      Der Doku-Link oben im Forum führt nur zu einer Quelle. Die alte Doku findet man nur noch per Suchmaschine.

                                      @Pete0815 sagte in NPM Installation nach Anleitung?:

                                      Problem war dann die Nutzung der alten Doku von der Internetseite.

                                      Im ersten Post hast Du einen Link auf die aktuelle Anleitung angegeben.

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

                                        @paul53 sagte in NPM Installation nach Anleitung?:

                                        @Pete0815 sagte:

                                        node und nodejs Version welche beide 10.15.2 sind.

                                        Das ist offenbar die mit Raspbian Buster gelieferte Version ohne npm. Lösche die Version und installiere Node.js nach Punkt 4. der Anleitung.

                                        which node
                                        which nodejs
                                        sudo rm /pfad/node
                                        sudo rm /pfad/nodejs
                                        curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
                                        sudo apt install -y nodejs
                                        sudo reboot
                                        node -v
                                        nodejs -v
                                        npm -v
                                        

                                        pfad anpassen !

                                        Ich bin auch nach deiner Anleitung vorgegangen, weil bei mir nodejs zweimal im System installiert ist, aber wenn ich alles gemacht habe kommt bei "nodejs -v"

                                        root@iobroker:~# nodejs -v
                                        -bash: nodejs: Kommando nicht gefunden.
                                        
                                        

                                        Was kann ich tun ?

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

                                          @marcuskl sagte:

                                          -bash: nodejs: Kommando nicht gefunden.

                                          Das ist verwunderlich, dass der Symlink nodejs nicht auch bei der Installation erzeugt wurde. ioBroker benötigt ihn nicht. Was ergibt ?

                                          node -v
                                          which node
                                          
                                          marcuskl 1 Reply Last reply Reply Quote 0
                                          • marcuskl
                                            marcuskl @paul53 last edited by

                                            @paul53 ich habe ein Rollback gemacht und bin nochmal nach deiner Anleitung vorgegangen.

                                            Diesmal habe ich danach nochmal kontrolliert mit node -v ob alles weg ist, es war aber noch da

                                            root@iobroker:~# which node
                                            /usr/local/bin/node
                                            root@iobroker:~# which nodejs
                                            /usr/bin/nodejs
                                            root@iobroker:~# rm /usr/local/bin/node
                                            root@iobroker:~# rm /usr/bin/nodejs
                                            root@iobroker:~# node -v
                                            v10.19.0
                                            root@iobroker:~# which node
                                            /usr/bin/node
                                            root@iobroker:~# rm /usr/bin/node
                                            root@iobroker:~# ode -v
                                            -bash: ode: Kommando nicht gefunden.
                                            root@iobroker:~# node -v
                                            -bash: /usr/bin/node: Datei oder Verzeichnis nicht gefunden
                                            root@iobroker:~# nodejs -v
                                            -bash: nodejs: Kommando nicht gefunden.
                                            
                                            

                                            Habe nochmal rm /pfad/node gemacht, danach war alles weg.
                                            Aber jetzt lässt sich nodejs nicht mehr installieren, er sagt mir es ist schon drauf:

                                            root@iobroker:~# sudo apt install -y nodejs
                                            Paketlisten werden gelesen... Fertig
                                            Abhängigkeitsbaum wird aufgebaut.
                                            Statusinformationen werden eingelesen.... Fertig
                                            nodejs ist schon die neueste Version (10.19.0-1nodesource1).
                                            Das folgende Paket wurde automatisch installiert und wird nicht mehr benötigt:
                                              linux-image-4.9.0-8-amd64
                                            Verwenden Sie »sudo apt autoremove«, um es zu entfernen.
                                            0 aktualisiert, 0 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.
                                            
                                            

                                            Dabei kommt gar nichts wenn ich node -v, nodejs -v eingebe:

                                            root@iobroker:~# node -v
                                            -bash: /usr/bin/node: Datei oder Verzeichnis nicht gefunden
                                            root@iobroker:~# nodejs -v
                                            -bash: nodejs: Kommando nicht gefunden.
                                            root@iobroker:~# npm -v
                                            /usr/bin/env: „node“: Datei oder Verzeichnis nicht gefunden
                                            root@iobroker:~#
                                            
                                            
                                            
                                            paul53 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

                                            510
                                            Online

                                            31.9k
                                            Users

                                            80.3k
                                            Topics

                                            1.3m
                                            Posts

                                            anleitung installation node.js npm
                                            7
                                            34
                                            18467
                                            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