Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. ioBroker Allgemein
    4. Diskussion zum HowTo nodejs-Installation und upgrade

    NEWS

    • ioBroker goes Matter ... Matter Adapter in Stable

    • 15. 05. Wartungsarbeiten am ioBroker Forum

    • Monatsrückblick - April 2025

    Diskussion zum HowTo nodejs-Installation und upgrade

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

      @thomas-braun said in Diskussion zum HowTo nodejs-Installation und upgrade:

      sudo apt full-upgrade

      Danke für die Hilfe Thomas Braun
      Aber iwas hab ich wohl wieder zerschossen

      
      pi@raspberrypi:/etc/apt/sources.list.d $ uname -m && type -P nodejs node npm && nodejs -v && node -v && npm -v && iob -v && whoami && groups && echo $XDG_SESSION_TYPE && pwd && sudo apt-get update &> /dev/null && sudo apt-get update && apt-cache policy nodejs
      armv7l
      /usr/bin/nodejs
      /usr/local/bin/node
      /usr/bin/npm
      v16.19.0
      -bash: /usr/local/bin/node: Datei oder Verzeichnis nicht gefunden
      
      
      Thomas Braun 1 Reply Last reply Reply Quote 0
      • Thomas Braun
        Thomas Braun Most Active @UncleB last edited by

        @uncleb

        Starte mal neu.

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

          @thomas-braun jetzt hats geklappt, vielen dank 🙂

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

            @uncleb

            Was spuckt jetzt der Check aus?

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

              @thomas-braun

              pi@raspberrypi:~ $ uname -m && type -P nodejs node npm && nodejs -v && node -v && npm -v && iob -v && whoami && groups && echo $XDG_SESSION_TYPE && pwd && sudo apt-get update &> /dev/null && sudo apt-get update && apt-cache policy nodejs
              armv7l
              /usr/bin/nodejs
              /usr/bin/node
              /usr/bin/npm
              v16.19.0
              v16.19.0
              8.19.3
              4.0.23
              pi
              pi adm dialout cdrom sudo audio video plugdev games users input netdev gpio i2c spi iobroker
              tty
              /home/pi
              OK:1 http://raspbian.raspberrypi.org/raspbian buster InRelease
              OK:2 http://archive.raspberrypi.org/debian buster InRelease
              OK:3 https://repos.influxdata.com/debian buster InRelease
              OK:4 https://deb.nodesource.com/node_14.x buster InRelease
              OK:5 https://deb.nodesource.com/node_16.x buster InRelease
              Paketlisten werden gelesen... Fertig
              nodejs:
                Installiert:           16.19.0-deb-1nodesource1
                Installationskandidat: 16.19.0-deb-1nodesource1
                Versionstabelle:
               *** 16.19.0-deb-1nodesource1 500
                      500 https://deb.nodesource.com/node_16.x buster/main armhf Packages
                      100 /var/lib/dpkg/status
                   14.21.1-deb-1nodesource1 500
                      500 https://deb.nodesource.com/node_14.x buster/main armhf Packages
                   10.24.0~dfsg-1~deb10u2 500
                      500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages
              
              
              Thomas Braun 1 Reply Last reply Reply Quote 0
              • Thomas Braun
                Thomas Braun Most Active @UncleB last edited by

                @uncleb

                Gut, die Basis ist jetzt sauber. Dann kannste ja als nächstes den Buster beerdigen.

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

                  @thomas-braun oh ne, das lass ich jetzt mal so laufen, sonst geht wieder gar nichts mehr 😄

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

                    @uncleb

                    Buster hatte sein End Of Life im September erreicht.
                    Du kommst um das Thema nicht herum, je länger du wartest desto komplexer kann das werden.

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

                      @uncleb

                      f50ccbe7-3ec0-4ad9-a821-a7ba8ec23f20-grafik.png

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

                        @thomas-braun hab mich doch dran gewagt 🐶 Danke für deine super Anleitungen

                        pi@raspberrypi:~ $ neofetch
                          `.::///+:/-.        --///+//-:``    pi@raspberrypi
                         `+oooooooooooo:   `+oooooooooooo:    --------------
                          /oooo++//ooooo:  ooooo+//+ooooo.    OS: Raspbian GNU/Linux 11 (bullseye) armv7l
                          `+ooooooo:-:oo-  +o+::/ooooooo:     Host: Raspberry Pi 3 Model B Rev 1.2
                           `:oooooooo+``    `.oooooooo+-      Kernel: 5.15.76-v7+
                             `:++ooo/.        :+ooo+/.`       Uptime: 3 mins
                                ...`  `.----.` ``..           Packages: 724 (dpkg)
                             .::::-``:::::::::.`-:::-`        Shell: bash 5.1.4
                            -:::-`   .:::::::-`  `-:::-       Terminal: /dev/pts/0
                           `::.  `.--.`  `` `.---.``.::`      CPU: BCM2835 (4) @ 1.200GHz
                               .::::::::`  -::::::::` `       Memory: 183MiB / 922MiB
                         .::` .:::::::::- `::::::::::``::.
                        -:::` ::::::::::.  ::::::::::.`:::-
                        ::::  -::::::::.   `-::::::::  ::::
                        -::-   .-:::-.``....``.-::-.   -::-
                         .. ``       .::::::::.     `..`..
                           -:::-`   -::::::::::`  .:::::`
                           :::::::` -::::::::::` :::::::.
                           .:::::::  -::::::::. ::::::::
                            `-:::::`   ..--.`   ::::::.
                              `...`  `...--..`  `...`
                                    .::::::::::
                                     `.-::::-`
                        
                        

                        Oh no, zu früh gefreut

                        pi@raspberrypi:~ $ iobroker start admin
                        node:internal/modules/cjs/loader:998
                          throw err;
                          ^
                        
                        Error: Cannot find module '/opt/iobroker/node_modules/iobroker.js-controller/iobroker.js'
                            at Function.Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
                            at Function.Module._load (node:internal/modules/cjs/loader:841:27)
                            at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
                            at node:internal/main/run_main_module:22:47 {
                          code: 'MODULE_NOT_FOUND',
                          requireStack: []
                        }
                        
                        
                        Thomas Braun 1 Reply Last reply Reply Quote 0
                        • Thomas Braun
                          Thomas Braun Most Active @UncleB last edited by

                          @uncleb

                          cd /opt/iobroker
                          sudo -H -u iobroker npm install iobroker.js-controller
                          
                          JB_Sullivan U 2 Replies Last reply Reply Quote 0
                          • JB_Sullivan
                            JB_Sullivan @Thomas Braun last edited by

                            @thomas-braun du bist doch "the Master of Linux Update" und hast die Tolle Anleitung für ein npm Update geschrieben.

                            Ich bin ja eigentlich in der Windows Welt unterwegs. Trotzdem habe ich es irgendwann mal geschaft eine ioB Installation unter Proxmox / Debian aufzusetzen. Diese Installation nutze ich eigentlich nur, wenn ich Adapter Updates teste, die potentiell viel Blödsinn anrichten können - also mit anderen Worten, äußert selten.

                            Heute war wieder so ein Tag und ich habe festgestellt, das ich nich auf npm 14.x bin. Nun wollte ich gemäß deiner Anleitung das System auf npm 16.x ziehen.

                            Wie du ja immer schreibst, "Finger weg vom root". Also wollte ich mit meinem vergebenen User erstmal ein iob fix durchführen. Hier hatte ich schon das 1. Problem, das mein Standard User keine Schreibrechte hat. Auch beim Versuch ein npm Update gemäß deiner Anleitung zu machen waren wieder die fehlenden Schreibrechte vom Standard User das Problem.

                            Kannst du mir einen Hinweis geben, wie ich dem Standarduser schreibrechte geben kann? Eigentlich sollte das doch der ioB Fixer machen - oder nicht? Vielen Dank für deine Unterstützung.

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

                              @jb_sullivan sagte in Diskussion zum HowTo nodejs-Installation und upgrade:

                              Eigentlich sollte das doch der ioB Fixer machen - oder nicht?

                              Nein, der iobroker fixer packt die Rechte von Standardusern (vom User 'iobroker' abgesehen) natürlich nicht an.
                              Für Proxmox gibt es aber eine gute Anleitung in der iobroker Dokumentation. Da steht drin wie man da einen User mit den richtigen Rechten und Gruppenzugehörigkeiten ausstattet.

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

                                @thomas-braun
                                Hm iwas passt da nicht, konnte erst heute weitermachen

                                pi@raspberrypi:/opt/iobroker $ sudo -H -u iobroker npm install iobroker.js-controller
                                npm ERR! code ENOTEMPTY
                                npm ERR! syscall rename
                                npm ERR! path /opt/iobroker/node_modules/agent-base
                                npm ERR! dest /opt/iobroker/node_modules/.agent-base-ZzrsLltQ
                                npm ERR! errno -39
                                npm ERR! ENOTEMPTY: directory not empty, rename '/opt/iobroker/node_modules/agent-base' -> '/opt/iobroker/node_modules/.agent-base-ZzrsLltQ'
                                
                                npm ERR! A complete log of this run can be found in:
                                npm ERR!     /home/iobroker/.npm/_logs/2022-12-25T08_22_02_504Z-debug-0.log
                                
                                

                                Soll ich die log posten?
                                Das sind 4000 Zeilen 😄

                                Glasfaser 1 Reply Last reply Reply Quote 0
                                • Glasfaser
                                  Glasfaser @UncleB last edited by

                                  @uncleb sagte in Diskussion zum HowTo nodejs-Installation und upgrade:

                                  Hm iwas passt da nicht, konnte erst heute weitermachen

                                  Einmal das in die Konsole

                                  Nicht abtippen .. sondern kopieren !!

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

                                  danach dein

                                  sudo -H -u iobroker npm install iobroker.js-controller
                                  
                                  U 1 Reply Last reply Reply Quote 0
                                  • Homoran
                                    Homoran Global Moderator Administrators @JB_Sullivan last edited by

                                    @jb_sullivan sagte in Diskussion zum HowTo nodejs-Installation und upgrade:

                                    und hast die Tolle Anleitung für ein npm Update geschrieben.

                                    never!
                                    npm wird nicht einzeln mit der Hand angefasst.

                                    1 Reply Last reply Reply Quote 0
                                    • U
                                      UncleB @Glasfaser last edited by Homoran

                                      @glasfaser said in [Diskussion zum HowTo nodejs-Installation und upgrade](/post/916062

                                      > sudo -H -u iobroker npm install iobroker.js-controller
                                      
                                      pi@raspberrypi:/opt/iobroker $ for i in $(find /opt/iobroker/node_modules -type d -iname ".*-????????" ! -iname ".local-chromium"); do rm -rf ${i%%/}; done
                                      pi@raspberrypi:/opt/iobroker $ sudo -H -u iobroker npm install iobroker.js-controller
                                      npm WARN deprecated dgram@1.0.1: npm is holding this package for security reasons. As it's a core Node module, we will not transfer it over to other users. You may safely remove the package from your dependencies.
                                      npm WARN deprecated har-validator@5.1.5: this library is no longer supported
                                      npm WARN deprecated request-promise@4.2.6: request-promise has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
                                      npm WARN deprecated node-inspect@2.0.0: This module is part of Node.js core and does not need to be installed separately. It is now unmaintained.
                                      npm WARN deprecated debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
                                      npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
                                      npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
                                      npm ERR! code 22
                                      npm ERR! path /opt/iobroker/node_modules/iobroker.js-controller
                                      npm ERR! command failed
                                      npm ERR! command sh -c -- node iobroker.js setup first
                                      npm ERR! No connection to databases possible ...
                                      npm ERR!  Cannot load "custom": Connection is closed.
                                      npm ERR!  Cannot initialize database scripts: Cannot load "custom" into objects database: Connection is closed.
                                      
                                      npm ERR! A complete log of this run can be found in:
                                      npm ERR!     /home/iobroker/.npm/_logs/2022-12-25T09_41_59_839Z-debug-0.log
                                      

                                      MOD-EDIT: Codeincode-tagsgesetzt!

                                      mikeal created this issue in request/request

                                      open Request’s Past, Present and Future #3142

                                      Qix- created this issue in visionmedia/debug

                                      closed ReDos Vulnerability Regression Visibility Notice #797

                                      mikeal created this issue in request/request

                                      open Request’s Past, Present and Future #3142

                                      Glasfaser 1 Reply Last reply Reply Quote 0
                                      • Glasfaser
                                        Glasfaser @UncleB last edited by

                                        @uncleb sagte in Diskussion zum HowTo nodejs-Installation und upgrade:

                                        Warum packst du die Ausgabe nicht in Code-Tags </> , das kann man so nicht lesen.

                                        No connection to databases possible ...

                                        und zeige mal :

                                        du -sh  /opt/iobroker/iobroker-data/objects.jsonl
                                        
                                        U 1 Reply Last reply Reply Quote 0
                                        • U
                                          UncleB @Glasfaser last edited by

                                          @glasfaser said in Diskussion zum HowTo nodejs-Installation und upgrade:

                                          du -sh /opt/iobroker/iobroker-data/objects.jsonl

                                          Sorry, nun in den Code Tags

                                          pi@raspberrypi:/opt/iobroker $ du -sh  /opt/iobroker/iobroker-data/objects.jsonl
                                          5,1M    /opt/iobroker/iobroker-data/objects.jsonl
                                          
                                          
                                          1 Reply Last reply Reply Quote 0
                                          • U
                                            UncleB last edited by

                                            Keiner mehr ne Idee??
                                            Ich hätte das Update einfach sein lassn sollen..

                                            Thomas Braun 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

                                            981
                                            Online

                                            31.6k
                                            Users

                                            79.5k
                                            Topics

                                            1.3m
                                            Posts

                                            nodejs
                                            91
                                            844
                                            166059
                                            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