Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. ioBroker Allgemein
    4. [How-to] Node.js für ioBroker richtig updaten

    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

    [How-to] Node.js für ioBroker richtig updaten

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

      @michihorn sagte in [How-to] Node.js für ioBroker richtig updaten:

      nach einer Anleitung aus der "Chip"

      von wann ist diese Anleitung denn?

      @michihorn sagte in [How-to] Node.js für ioBroker richtig updaten:

      den Befehl "sudo apt-get update"

      benutzt man eigentlich schon länger nicht mehr.

      apt-get wurde durch ein einfaches apt ersetzt (grob gesagt)

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

        @thomas-braun Nein, hab alle Updates immer nach der Anleitung hier im Forum gemacht.

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

          @m0uh

          Lösch mal den npm cache.

          sudo -H -u iobroker npm cache clean --force
          
          M 1 Reply Last reply Reply Quote 0
          • M
            m0uh @Thomas Braun last edited by

            @thomas-braun Selber Fehler

            pi@iobroker:~ $ sudo -H -u iobroker npm cache clean --force
            /usr/lib/node_modules/npm/lib/cli.js:35
                throw err
                ^
            
            TypeError: Class extends value undefined is not a constructor or null
                at Object.<anonymous> (/usr/lib/node_modules/npm/node_modules/fs-minipass/lib/index.js:136:4)
                at Module._compile (node:internal/modules/cjs/loader:1256:14)
                at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
                at Module.load (node:internal/modules/cjs/loader:1119:32)
                at Module._load (node:internal/modules/cjs/loader:960:12)
                at Module.require (node:internal/modules/cjs/loader:1143:19)
                at require (node:internal/modules/cjs/helpers:121:18)
                at Object.<anonymous> (/usr/lib/node_modules/npm/node_modules/cacache/lib/content/read.js:4:13)
                at Module._compile (node:internal/modules/cjs/loader:1256:14)
                at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
            
            Node.js v18.17.1
            
            
            Thomas Braun 1 Reply Last reply Reply Quote 0
            • Thomas Braun
              Thomas Braun Most Active @m0uh last edited by

              @m0uh sagte in [How-to] Node.js für ioBroker richtig updaten:

              Mach einen eigenen Thread auf und gib da mal die Ausgabe von

              iob diag
              

              rein. Dürfte zwar sehr zerfetzt aussehen, aber sei's drum.

              M M 2 Replies Last reply Reply Quote 0
              • M
                m0uh @Thomas Braun last edited by

                @thomas-braun Erledigt. Siehe:

                https://forum.iobroker.net/topic/67912/nodejs-update-von-16-x-auf-18-x-nicht-möglich-npm-fehler

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

                  @thomas-braun Installation-Setup wird als veraltet angemerkt. Gibt es da was Neues?

                  Hab es in Deiner Signatur nachvollzogen. ok.

                  prox@jarvisV313:~$ curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
                  
                  ================================================================================
                  ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
                  ================================================================================
                  
                                             SCRIPT DEPRECATION WARNING                    
                  
                    
                    This script, located at https://deb.nodesource.com/setup_X, used to
                    install Node.js is deprecated now and will eventually be made inactive.
                  
                    Please visit the NodeSource distributions Github and follow the
                    instructions to migrate your repo.
                    https://github.com/nodesource/distributions
                  
                    The NodeSource Node.js Linux distributions GitHub repository contains
                    information about which versions of Node.js and which Linux distributions
                    are supported and how to install it.
                    https://github.com/nodesource/distributions
                  
                  
                                            SCRIPT DEPRECATION WARNING
                  
                  ================================================================================
                  ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
                  ================================================================================
                  
                  TO AVOID THIS WAIT MIGRATE THE SCRIPT
                  Continuing in 60 seconds (press Ctrl-C to abort) ...
                  
                  Thomas Braun 1 Reply Last reply Reply Quote 0
                  • Thomas Braun
                    Thomas Braun Most Active @MCU last edited by

                    @mcu sagte in [How-to] Node.js für ioBroker richtig updaten:

                    Hab es in Deiner Signatur nachvollzogen. ok.

                    Ja, da hab ich es schon drin. Und im 'Beta-iob-diag' ist es auch drin.
                    Ich wollte mir die Tage dann vielleicht auch den iob installer mal anschauen und einen PR schreiben.

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

                      @thomas-braun Wie kann man denn z.B. nodejs 20 sperren?

                      Achtung, wenn das Repo mit einer höheren Version nicht deaktiviert wird kommt beim nächsten apt update / apt upgrade natürlich die höhere Version mit.

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

                        @mcu

                        Einfach keine Zeile für nodejs@20 anlegen.
                        Die Versionszweige kommen immer noch aus separaten Einträgen.

                        ODER man pinnt ein nodejs@18 fest. Ging per 'apt pinning'

                        1 Reply Last reply Reply Quote 1
                        • PLCHome 0
                          PLCHome 0 Developer last edited by Homoran

                          Also das Installieren hat sich geändert.
                          Man soll das Script nicht mehr benutzen:

                          Alt:

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

                          Neu

                          sudo apt install -y ca-certificates curl gnupg
                          curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg 
                          NODE_MAJOR=18 
                          echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list 
                          sudo apt-get update && sudo apt-get install nodejs -y
                          

                          MOD-EDIT: Code korrigiert!

                          quelle: https://deb.nodesource.com/

                          mit NODE_MAJOR=18 kann man die Version bestimmen.

                          Das hier ist aber nur mit Bookworm getestet. NPM wird nur mit Version 20 mitinstalliert. Unter Buster ist bei mir eine 12 statt der 18 installiert worden.

                          Thomas Braun oberfragger F 3 Replies Last reply Reply Quote 0
                          • Thomas Braun
                            Thomas Braun Most Active @PLCHome 0 last edited by

                            @plchome-0 sagte in [How-to] Node.js für ioBroker richtig updaten:

                            Man muss nun das "Key verfahren "benutzen:

                            Nee, das ist nicht die Änderung, das wurde 'schon immer' verwendet.
                            Die Änderung ist im wesentlichen, das nicht mehr für jedes Distributions-Release ein deb gebaut wird sondern ein generisches, das auf alles passt, was die grundlegendsten Bedingungen erfüllt.
                            Gilt analog für yum / rpm-basierte Paketmanagementsysteme.

                            1 Reply Last reply Reply Quote 0
                            • oberfragger
                              oberfragger @PLCHome 0 last edited by oberfragger

                              @plchome-0 sagte in [How-to] Node.js für ioBroker richtig updaten:

                              Neu

                              sudo apt install -y ca-certificates curl gnupg
                              curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg 
                              NODE_MAJOR=18 
                              echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list 
                              sudo apt-get install nodejs npm -y
                              

                              quelle: https://deb.nodesource.com/

                              mit NODE_MAJOR=18 kann man die Version bestimmen.

                              Das hat bei mir nicht funktioniert.

                              The following packages have unmet dependencies:
                               libnode72 : Conflicts: nodejs-legacy
                               nodejs : Conflicts: npm
                              E: Unable to correct problems, you have held broken packages.
                              root@iobroker:/opt/iobroker#
                              

                              Muss ich irgendwas deinstallieren?

                              Habe zwischenzeitlich diesen Link gefunden.
                              https://github.com/Chia-Network/chia-blockchain/discussions/9673

                              Nach iobroekr start habe ich aber plötzlich die aktuelle 18.17.1 Seltsam.

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

                                @oberfragger sagte in [How-to] Node.js für ioBroker richtig updaten:

                                Muss ich irgendwas deinstallieren?

                                Ja.

                                sudo apt remove libnode72 npm nodejs-legacy
                                

                                Und hampel da nicht als root herum.

                                1 Reply Last reply Reply Quote 0
                                • F
                                  fastfoot @PLCHome 0 last edited by

                                  @plchome-0 sagte in [How-to] Node.js für ioBroker richtig updaten:

                                  quelle: https://deb.nodesource.com/

                                  da steht aber NICHTS von npm installieren so wie du es da stehen hast. Die Installation von nodejs beinhaltet bereits npm. Bitte ändere das ab damit sich dieser Unsinn nicht verbreitet

                                  PLCHome 0 1 Reply Last reply Reply Quote 0
                                  • PLCHome 0
                                    PLCHome 0 Developer @fastfoot last edited by

                                    @fastfoot ich setze jedes Mal einen Docker neu auf. NPM fehlte jedes Mal wenn ich nur NODEJS im apt hatte.

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

                                      @plchome-0 sagte in [How-to] Node.js für ioBroker richtig updaten:

                                      NPM fehlte jedes Mal wenn ich nur NODEJS im apt hatte.

                                      Das kann nicht sein, npm ist Bestandteil des nodejs-Pakets (Jedenfalls so wie es von nodesource zusammengebaut wird).
                                      Das nodejs in der dfsg-Version kommt allerdings ohne npm mit. Streng nach der Debian-Herangehensweise, Pakete möglichst modular und schlank aufzubauen.

                                      Und weil das so ist knallt das auch oben bei dir.
                                      Edit... War ja gar nicht bei dir, wo das knallt...

                                      1 Reply Last reply Reply Quote 0
                                      • F
                                        fastfoot @PLCHome 0 last edited by

                                        @plchome-0 ich setze ständig neue Container auf und installiere node, hundert mal in den letzten Wochen ist nicht übertrieben, und npm hat da nie gefehlt. es ging mir auch darum dass wenn du schon eine quelle nennst du sie nicht einfach abändern kannst!

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

                                          @oberfragger

                                          Prüfe ob das jetzt da alles senkrecht ist bei dir.
                                          Das schaut irgendwie schräg aus.

                                          iob diag 
                                          

                                          oder damit:
                                          https://forum.iobroker.net/topic/68035/iob-node-fix-skript

                                          1 Reply Last reply Reply Quote 0
                                          • PLCHome 0
                                            PLCHome 0 Developer @fastfoot last edited by

                                            @fastfoot sagte in [How-to] Node.js für ioBroker richtig updaten:

                                            @plchome-0 ich setze ständig neue Container auf und installiere node, hundert mal in den letzten Wochen ist nicht übertrieben,

                                            Ich brauche keine Hundert container: Also neuer Container unter Bookworm, mit genau dem was oben steht und nix npm.

                                            cd4425aa-6bfa-4e8e-b72d-f7fed0e7f180-image.png

                                            Wenn man die 20 installiert, ist npm es drauf.
                                            a1954983-2ac7-4472-8cf3-be2a84c66811-image.png

                                            Meines Wissens nach soll der ioB aber unter 18 laufen.
                                            Es gibt auch noch weitere Problemen unter bullseye kommt, wenn man die 18 einträgt eine 12.

                                            Ist wohl alles nicht so ausgereift.

                                            Thomas Braun Homoran F 4 Replies 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

                                            795
                                            Online

                                            31.8k
                                            Users

                                            80.0k
                                            Topics

                                            1.3m
                                            Posts

                                            installation linux node node.js nodejs windows
                                            106
                                            1105
                                            676963
                                            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