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 ioBroker richtig updaten-2021/22 Edition

    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 ioBroker richtig updaten-2021/22 Edition

    This topic has been deleted. Only users with topic management privileges can see it.
    • R
      ronny130286 @Thomas Braun last edited by ronny130286

      @thomas-braun

      Ja das habe ich gemacht jedoch wirft er mir dabei auch schon Fehler 😞

      pi@iobroker:~ $ iobroker stop
      pi@iobroker:~ $ cd /opt/iobroker
      pi@iobroker:/opt/iobroker $ sudo -H -u iobroker npm install iobroker.js-controll                                                                      er
      npm ERR! code ENOTEMPTY
      npm ERR! syscall rename
      npm ERR! path /opt/iobroker/node_modules/acme-http-01-standalone
      npm ERR! dest /opt/iobroker/node_modules/.acme-http-01-standalone-sG2kCsLK
      npm ERR! errno -39
      npm ERR! ENOTEMPTY: directory not empty, rename '/opt/iobroker/node_modules/acme-http-01-standalone' -> '/opt/iobroker/node_modules/.acme-http-01-standalone-sG2kCsLK'
      
      npm ERR! A complete log of this run can be found in:
      npm ERR!     /home/iobroker/.npm/_logs/2022-10-08T12_48_47_389Z-debug-0.log
      

      Ich könnte jetzt zwar die Ordner alle löschen (weil er würde jetzt mehrere anzeigen) oder den Befehl

      for i in $(find /opt/iobroker/node_modules -type d -iname ".*-????????" ! -iname ".local-chromium"); do rm -rf ${i%/}; done
      

      nutzen, nur der Fehler mit dem

      Error: Cannot find module 'async/forEach'
      

      bleibt nach dem Neustart bestehen

      ich hatte sogar den node_modules ordner schon komplett gelöscht und deine Befehlfolge ausgeführt, ohne Erfolg.
      Ich nutze einen Raspi 4, kann es sein das irgendwas am Kernsystem hops gegangen ist?

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

        @ronny130286

        Mal jemals npm von Hand angepackt?

        1 Reply Last reply Reply Quote 0
        • R
          ronny130286 last edited by

          @thomas-braun

          eigentlich nicht, ich hatte vor ein paar Monaten mal da upgrade auf nodejs 16 und npm 8 gemacht, bis gestern lief auf alles, ich konnte dann nur gestern kein Adapter mehr updaten und so fing das Desaster an.

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

            @ronny130286

            Ich würde ja glatt behaupten das async/forEach wirklich kein node Modul ist. Aber wo der das jetzt hernimmt?

            cd /opt/iobroker
            npm ls async/forEach
            
            R 1 Reply Last reply Reply Quote 0
            • R
              ronny130286 @Thomas Braun last edited by ronny130286

              @thomas-braun

              dabei kommt das raus

              pi@iobroker:/opt/iobroker $ cd /opt/iobroker
              pi@iobroker:/opt/iobroker $ npm ls async/forEach
              iobroker.inst@3.0.0 /opt/iobroker
              └── (empty)
              

              was würdest mir empfehlen jetzt zu machen?

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

                @ronny130286

                Neuinstallieren.

                R 1 Reply Last reply Reply Quote 0
                • R
                  ronny130286 @Thomas Braun last edited by

                  @thomas-braun

                  das komplette System oder "nur" den iobroker?

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

                    @ronny130286

                    Kommt drauf an wie du da sonst unterwegs bist.

                    sudo apt update &> /dev/null && sudo apt update && apt policy nodejs
                    
                    R 1 Reply Last reply Reply Quote 0
                    • R
                      ronny130286 @Thomas Braun last edited by

                      @thomas-braun

                      pi@iobroker:/opt/iobroker $ sudo apt update &> /dev/null && sudo apt update && apt policy nodejs
                      OK:1 http://raspbian.raspberrypi.org/raspbian buster InRelease
                      OK:2 https://repos.influxdata.com/debian buster InRelease
                      OK:3 http://archive.raspberrypi.org/debian buster InRelease
                      OK:4 https://deb.nodesource.com/node_16.x buster InRelease
                      Paketlisten werden gelesen... Fertig
                      Abhängigkeitsbaum wird aufgebaut.
                      Statusinformationen werden eingelesen.... Fertig
                      Alle Pakete sind aktuell.
                      nodejs:
                        Installiert:           16.17.1-deb-1nodesource1
                        Installationskandidat: 16.17.1-deb-1nodesource1
                        Versionstabelle:
                       *** 16.17.1-deb-1nodesource1 500
                              500 https://deb.nodesource.com/node_16.x buster/main armhf Packages
                              100 /var/lib/dpkg/status
                           10.24.0~dfsg-1~deb10u2 500
                              500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages
                      

                      bei mir ist nur der IoBroker auf dem Pi installiert, meine JS Skripte habe ich noch doof ist halt das ich nur noch ne älteres Backupit haben 😞
                      aber wenn ich den iobroker-data Ordner sichere müsste das ja eigentlich dann auch als backup gehen, wenn ich komplett neu installiere oder?

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

                        @ronny130286 sagte in [How-to] Node.js ioBroker richtig updaten-2021/22 Edition:

                        doof ist halt das ich nur noch ne älteres Backupit habe

                        Warum? Der macht bei mir jede Nacht automatisch ein Backup...

                        R 1 Reply Last reply Reply Quote 0
                        • R
                          ronny130286 @Thomas Braun last edited by ronny130286

                          @thomas-braun

                          Tja das sollte er bei mir eigentlich auch machen aber scheinbar war der Adapter schon offline und ich habe es nicht gecheckt 😞
                          Jetzt muss ich gucken was noch zu retten ist

                          Edit:
                          So läuft wieder, habe folgendes gemacht

                          • /opt/iobroker/ umbenannt /opt/iobrokerbackup/
                          • curl -sL https://iobroker.net/install.sh | bash - neuinstalliert
                          • iob stop
                          • aus dem Backupordner den iobroker-data in den neuen /opt/iobroker/ kopiert
                          • iob start
                          • nach gut einer halb Stunden liefe wieder alles ohne Probleme

                          Was für ein Schreck, unklar ist mir den noch wie das passiert ist😕

                          1 Reply Last reply Reply Quote 0
                          • C
                            cuci last edited by

                            Hallo zusammen,

                            ich habe NodeJs nach der Anleitung aktualisiert, aber es scheint als ob immer noch die alte Version verwendet wird:

                            root@ioBroker:~# sudo apt install -y nodejs
                            Reading package lists... Done
                            Building dependency tree... Done
                            Reading state information... Done
                            nodejs is already the newest version (16.18.0-deb-1nodesource1).
                            The following packages were automatically installed and are no longer required:
                              gyp javascript-common libc-ares2 libjs-events libjs-highlight.js libjs-inherits libjs-is-typedarray libjs-typedarray-to-buffer libnode72 libssl-dev libuv1-dev node-abbrev node-agent-base node-ansi-regex
                              node-ansi-styles node-ansistyles node-aproba node-archy node-are-we-there-yet node-asap node-balanced-match node-brace-expansion node-builtins node-chalk node-chownr node-cli-table node-clone node-color-convert
                              node-color-name node-colors node-columnify node-console-control-strings node-core-util-is node-debug node-decompress-response node-defaults node-delegates node-depd node-encoding node-end-of-stream node-err-code
                              node-escape-string-regexp node-events node-fancy-log node-fs-write-stream-atomic node-fs.realpath node-function-bind node-gauge node-get-stream node-glob node-got node-graceful-fs node-has-flag node-has-unicode
                              node-hosted-git-info node-https-proxy-agent node-iconv-lite node-iferr node-imurmurhash node-indent-string node-inflight node-inherits node-ini node-ip node-ip-regex node-is-typedarray node-isarray node-isexe
                              node-json-buffer node-json-parse-better-errors node-jsonparse node-lowercase-keys node-lru-cache node-mimic-response node-minimatch node-minipass node-ms node-mute-stream node-negotiator
                              node-normalize-package-data node-npm-bundled node-npm-package-arg node-npmlog node-object-assign node-once node-osenv node-p-cancelable node-p-map node-path-is-absolute node-process-nextick-args
                              node-promise-inflight node-promise-retry node-promzard node-pump node-quick-lru node-read node-read-package-json node-readable-stream node-resolve node-retry node-rimraf node-run-queue node-safe-buffer
                              node-semver node-set-blocking node-signal-exit node-slash node-slice-ansi node-spdx-correct node-spdx-exceptions node-spdx-expression-parse node-spdx-license-ids node-ssri node-string-decoder node-string-width
                              node-strip-ansi node-supports-color node-text-table node-time-stamp node-typedarray-to-buffer node-unique-filename node-util-deprecate node-validate-npm-package-license node-validate-npm-package-name
                              node-wcwidth.js node-whatwg-fetch node-wide-align node-wrappy node-write-file-atomic node-yallist
                            Use 'sudo apt autoremove' to remove them.
                            0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
                            root@ioBroker:~# node -v
                            v12.22.9
                            

                            Beim Admin Adapter werden mir nun 2 Versionen angezeigt:
                            Plattform: linux
                            RAM: 2 GB
                            Node.js: v12.22.9**(12.22.12 / 16.18.0)**
                            NPM: v6.14.15(8.19.2)

                            Wie kann ich die neue Version verwenden?

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

                              @cuci

                              sudo apt autoremove
                              

                              Für weiteres schau in meiner Signatur.
                              Und halt nicht als root herum hampeln.

                              C 1 Reply Last reply Reply Quote 0
                              • C
                                cuci @Thomas Braun last edited by

                                @thomas-braun

                                danke. Das habe ich jetzt ausgeführt. Aber immer noch kein Unterschied.
                                Ich bin auch deine Anleitung durchgegangen, für mich scheint eigentlich alles funktioniert zu haben:

                                All packages are up to date.
                                nodejs:
                                  Installed: 16.18.0-deb-1nodesource1
                                  Candidate: 16.18.0-deb-1nodesource1
                                  Version table:
                                 *** 16.18.0-deb-1nodesource1 500
                                        500 https://deb.nodesource.com/node_16.x jammy/main amd64 Packages
                                        100 /var/lib/dpkg/status
                                     12.22.9~dfsg-1ubuntu3 500
                                        500 http://archive.ubuntu.com/ubuntu jammy/universe amd64 Packages
                                

                                Hast du noch andere Ideen?

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

                                  @cuci

                                  Mach einen eigenen Thread auf. Und da dann die Ausgabe zu dem 'Check' aus meinem How to rein.
                                  Dann schauen wir weiter.

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

                                    Abend zusammen,
                                    jetzt stehe ich wieder an dem Punkt mein System zu aktualisieren.

                                    PlatformBetriebssystem:linux
                                    Architektur:arm
                                    CPUs:4
                                    Geschwindigkeit:1400 MHz
                                    Modell:ARMv7 Processor rev 4 (v7l)
                                    RAM:923.1 MB
                                    System-Betriebszeit:00:17:17
                                    Node.js:v16.15.1
                                    time:1667153590335
                                    timeOffset:-60
                                    Adapter-Anzahl:443
                                    NPM:v8.11.0
                                    Datenträgergröße:29.0 GB
                                    Freier Festplattenspeicher:24.5 GB
                                    Betriebszeit:00:00:45
                                    Aktive Instanzen:10
                                    Pfad:/opt/iobroker/
                                    aktiv:true
                                    _nodeCurrent:16.15.1
                                    _nodeNewest:16.18.0
                                    _nodeNewestNext:16.18.0
                                    _npmCurrent:8.11.0
                                    _npmNewest:8.11.0
                                    _npmNewestNext:8.19.2

                                    Hat jemand eine Anleitung um node js und npm zu aktualisieren?

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

                                      @justforfun

                                      Wie wäre es danach?
                                      https://forum.iobroker.net/topic/35090/howto-nodejs-installation-und-upgrades-unter-debian

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

                                        @justforfun sagte in [How-to] Node.js ioBroker richtig updaten-2021/22 Edition:

                                        Hat jemand eine Anleitung um node js und npm zu aktualisieren?

                                        Sollte eigentlich im Zuge der regelmäßigen, üblichen Systempflege aktualisiert werden.

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

                                          @thomas-braun

                                          vielen Dank. Mir wird jetzt auch die richtige und neue Version angezeigt in der Übersicht. Habe das System neugestartet. Muss man sonst noch etwas machen weil die Anleitung ja noch einige Punkte nach dem reboot aufzeigt?

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

                                            @justforfun sagte in [How-to] Node.js ioBroker richtig updaten-2021/22 Edition:

                                            Muss man sonst noch etwas machen weil die Anleitung ja noch einige Punkte nach dem reboot aufzeigt?

                                            Was meinst du konkret?
                                            Was kommt bei

                                            sudo ln -s /usr/bin/node /usr/bin/nodejs
                                            uname -m && type -P nodejs node npm && nodejs -v && node -v && npm -v && iob -v && whoami && groups && echo $XDG_SESSION_TYPE && echo $DESKTOP_SESSION && pwd && sudo apt update &> /dev/null && sudo apt update && apt policy nodejs
                                            

                                            herum?

                                            JuStForFun 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

                                            548
                                            Online

                                            31.7k
                                            Users

                                            79.9k
                                            Topics

                                            1.3m
                                            Posts

                                            97
                                            812
                                            315318
                                            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