Navigation

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

    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

    NPM Fehler

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

      @thomas-braun

      ja scheinbar hatte es nicht den gewünschten Effekt.

      Wie könnte ich NPM wieder für ioBroker gefixt bekommen?

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

        @jokersmiler

        cd ~
        sudo ln -s /usr/bin/node /usr/bin/nodejs
        uname -m && which nodejs node npm && nodejs -v && node -v && npm -v && whoami && pwd && sudo apt update &> /dev/null && sudo apt update && apt policy nodejs
        
        1 Reply Last reply Reply Quote 0
        • Thomas Braun
          Thomas Braun Most Active @Jokersmiler last edited by

          @jokersmiler

          Bist du 'Winglet' im anderen Forum?
          Dann:
          Und nach welcher 'Anleitung' hast du initial die node16 ins System gebracht?

          1 Reply Last reply Reply Quote 0
          • J
            Jokersmiler last edited by Jokersmiler

            @thomas-braun

            Welches Forum - welcher Winglet? Nach deiner Empfehlung hab ich aus 14 mal 16 ausprobiert und dabei diese Anleitung versucht: https://www.iobroker.net/#de/documentation/install/linux.md

            Aber es scheint auch mit Unterstützung wohl schwierig zu sein, wieder eine funktionierende Umgebung hinzubekommen. Bislang ist mir folgendes aufgefallen

            • Soweit ich das sehe, ist Nodejs 16 mit npm 6 eher kompatibel zu sein, da im /opt/iobroker der npm -v angezeigt wird.
            • Iobroker fix läuft auch nicht ganz rund bei den Rechten, "double dot (..) wird wohl vergessen"
            • lrwxrwxrwx 1 root root 13 Jun 19 22:29 nodejs -> /usr/bin/node passt auch wieder

            Aber es tauchen weiterhin Fehler in der GUI auf, wie z.B.:

            host.IOBroker
            2022-06-20 21:59:24.788 info iobroker npm-install: exit 25
            host.IOBroker
            2022-06-20 21:59:23.747 error iobroker npm-install: host.IOBroker Cannot install iobroker.flot@1.10.7: 0
            host.IOBroker
            2022-06-20 21:59:22.995 info iobroker npm-install: Installing iobroker.flot@1.10.7... (System call)
            host.IOBroker
            2022-06-20 21:59:22.994 info iobroker npm-install: NPM version: 6.14.17
            host.IOBroker
            2022-06-20 21:59:20.190 info iobroker install flot using installedVersion

            Eine Idee woran das liegen könnte?

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

              @jokersmiler sagte in NPM Fehler:

              ist Nodejs 16 mit npm 6 eher kompatibel zu sein

              Nein. nodejs16 kommt mit npm8 daher. Das ist dann auch bestens miteinander kompatibel.

              Iobroker fix läuft auch nicht ganz rund bei den Rechten, "double dot (..) wird wohl vergessen"

              Du weißt schon, dass die . und .. in den Verzeichnissen eh ganz eigenen Regeln unterliegen? Pack die nie an!

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

                @jokersmiler sagte in NPM Fehler:

                Eine Idee woran das liegen könnte?

                Nein. Wie hast du denn jetzt nodejs hingefummelt?

                uname -m && which nodejs node npm && nodejs -v && node -v && npm -v && whoami && pwd && sudo apt update &> /dev/null && sudo apt update && apt policy nodejs
                
                J 1 Reply Last reply Reply Quote 0
                • J
                  Jokersmiler @Thomas Braun last edited by

                  @thomas-braun

                  den symbolischen Link angepasst.

                  npm8 löst folgendes aus in der GUI
                  iobroker npm-install: Use "npm install -g npm@4" or "npm install -g npm@latest" to install a supported version.You need to make sure to repeat this step after installing an update to NodeJS and/or npm!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

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

                    @jokersmiler sagte in NPM Fehler:

                    den symbolischen Link angepasst.

                    Wat?

                    npm8 löst folgendes aus in der GUI

                    Noch mehr wat?
                    Was treibst du da bitte?

                    Bitte die Ausgaben im Terminal zu

                    uname -m && which nodejs node npm && nodejs -v && node -v && npm -v && whoami && pwd && sudo apt update &> /dev/null && sudo apt update && apt policy nodejs
                    
                    J 1 Reply Last reply Reply Quote 0
                    • Homoran
                      Homoran Global Moderator Administrators @Jokersmiler last edited by

                      @jokersmiler sagte in NPM Fehler:

                      npm8 löst folgendes aus in der GUI

                      welche GUI?

                      Textmeldungen bitte in code tags.

                      Wo kommt diese Meldung genau, bei welcher Aktion?
                      Wo kommt die her?
                      biei so vielen Ausrufezeichen sollte sie nicht von iob sein

                      was für ein Befehl soll iobroker npm install sein?

                      haus-automatisierung 1 Reply Last reply Reply Quote 0
                      • J
                        Jokersmiler @Thomas Braun last edited by Jokersmiler

                        @thomas-braun
                        Nach erneuten update auf nodejs v16x ohne Anpassung auf npm@6, also mit npm@8

                        pi@IOBroker:/opt/iobroker $ uname -m && which nodejs node npm && nodejs -v && node -v && npm -v && whoami && pwd && sudo apt update &> /dev/null && sudo apt update && apt policy nodejs
                        armv7l
                        /usr/bin/nodejs
                        /usr/bin/node
                        /usr/bin/npm
                        v16.15.1
                        v16.15.1
                        
                        pi@IOBroker:/opt/iobroker $ cd ..
                        pi@IOBroker:/opt $ cd ..
                        pi@IOBroker:/ $ uname -m && which nodejs node npm && nodejs -v && node -v && npm -v && whoami && pwd && sudo apt update &> /dev/null && sudo apt update && apt policy nodejs
                        armv7l
                        /usr/bin/nodejs
                        /usr/bin/node
                        /usr/bin/npm
                        v16.15.1
                        v16.15.1
                        8.12.2
                        pi
                        /
                        Hit:1 http://phoscon.de/apt/deconz buster InRelease
                        Hit:2 http://raspbian.raspberrypi.org/raspbian buster InRelease
                        Hit:3 http://archive.raspberrypi.org/debian buster InRelease
                        Hit:4 https://deb.nodesource.com/node_16.x buster InRelease
                        Reading package lists... Done
                        Building dependency tree
                        Reading state information... Done
                        15 packages can be upgraded. Run 'apt list --upgradable' to see them.
                        nodejs:
                          Installed: 16.15.1-deb-1nodesource1
                          Candidate: 16.15.1-deb-1nodesource1
                          Version table:
                         *** 16.15.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~deb10u1 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 @Jokersmiler last edited by Thomas Braun

                          @jokersmiler
                          Hast du das nach dem Quatsch vom Elsterdingens gemacht?

                          iobroker stop 
                          iobroker fix
                          iobroker start
                          cd /opt/iobroker
                          sudo -u iobroker which npm
                          which npm 
                          cd ~
                          which npm
                          
                          1 Reply Last reply Reply Quote 0
                          • J
                            Jokersmiler last edited by

                            @thomas-braun

                            das nicht:

                            sudo -u iobroker which npm
                            which npm 
                            cd ~
                            which npm
                            
                            Thomas Braun 1 Reply Last reply Reply Quote 0
                            • Thomas Braun
                              Thomas Braun Most Active @Jokersmiler last edited by

                              @jokersmiler

                              Bitte alle 8 Zeilen eingeben und die Rekationen im Terminal so posten, dass ich das auch nachvollziehen kann.

                              J 2 Replies Last reply Reply Quote 0
                              • J
                                Jokersmiler @Thomas Braun last edited by

                                @thomas-braun

                                pi@IOBroker:/ $ iobroker stop
                                pi@IOBroker:/ $ iobroker fix
                                library: loaded
                                Library version=2022-06-15
                                
                                ==========================================================================
                                
                                    Welcome to the ioBroker installation fixer!
                                    Script version: 2022-06-03
                                
                                    You might need to enter your password a couple of times.
                                
                                ==========================================================================
                                
                                
                                ==========================================================================
                                    Installing prerequisites (1/3)
                                ==========================================================================
                                
                                Hit:1 http://phoscon.de/apt/deconz buster InRelease
                                Hit:2 http://archive.raspberrypi.org/debian buster InRelease
                                Hit:3 http://raspbian.raspberrypi.org/raspbian buster InRelease
                                Hit:4 https://deb.nodesource.com/node_16.x buster InRelease
                                Reading package lists... Done
                                Installed gcc-c++
                                
                                ==========================================================================
                                    Checking ioBroker user and directory permissions (2/3)
                                ==========================================================================
                                
                                Created /etc/sudoers.d/iobroker
                                Fixing directory permissions...
                                
                                ==========================================================================
                                    Checking autostart (3/3)
                                ==========================================================================
                                
                                Enabling autostart...
                                Autostart enabled!
                                
                                ==========================================================================
                                
                                    Your installation was fixed successfully
                                    Run iobroker start to start ioBroker again!
                                
                                ==========================================================================
                                
                                pi@IOBroker:/ $ iobroker start
                                pi@IOBroker:/ $ cd /opt/iobroker
                                pi@IOBroker:/opt/iobroker $ sudo -u iobroker which npm
                                /usr/bin/npm
                                pi@IOBroker:/opt/iobroker $ which npm
                                /usr/bin/npm
                                pi@IOBroker:/opt/iobroker $ cd ~
                                pi@IOBroker:~ $ which npm
                                /usr/bin/npm
                                
                                
                                Thomas Braun 1 Reply Last reply Reply Quote 0
                                • haus-automatisierung
                                  haus-automatisierung Developer Most Active @Homoran last edited by

                                  @homoran sagte in NPM Fehler:

                                  welche GUI?

                                  Das sieht mir nach dieser Meldung aus: https://github.com/ioBroker/ioBroker.js-controller/issues/1895

                                  Kommt dann, wenn die npm Version nicht ermittelt werden konnte.

                                  klein0r created this issue in ioBroker/ioBroker.js-controller

                                  closed Remove (or update) hints to install npm in version 4 #1895

                                  1 Reply Last reply Reply Quote 1
                                  • J
                                    Jokersmiler @Thomas Braun last edited by

                                    @thomas-braun

                                    vielleicht hilft das hier etwas weiter...

                                    pi@IOBroker:/opt/iobroker $ npm rebuild
                                    
                                    pi@IOBroker:/opt/iobroker $ sudo -H npm rebuild
                                    npm ERR! code 1
                                    npm ERR! path /opt/iobroker/node_modules/iobroker.js-controller
                                    npm ERR! command failed
                                    npm ERR! command sh -c node lib/preinstallCheck.js
                                    npm ERR! NPM version:
                                    npm ERR! /opt/iobroker/node_modules/iobroker.js-controller/lib/preinstallCheck.js:111
                                    npm ERR!     if (v1.major > v2.major) {
                                    npm ERR!            ^
                                    npm ERR!
                                    npm ERR! TypeError: Cannot read properties of null (reading 'major')
                                    npm ERR!     at gt (/opt/iobroker/node_modules/iobroker.js-controller/lib/preinstallCheck.js:111:12)
                                    npm ERR!     at gte (/opt/iobroker/node_modules/iobroker.js-controller/lib/preinstallCheck.js:191:12)
                                    npm ERR!     at /opt/iobroker/node_modules/iobroker.js-controller/lib/preinstallCheck.js:40:29
                                    npm ERR!     at ChildProcess.exithandler (node:child_process:406:5)
                                    npm ERR!     at ChildProcess.emit (node:events:527:28)
                                    npm ERR!     at maybeClose (node:internal/child_process:1092:16)
                                    npm ERR!     at Socket.<anonymous> (node:internal/child_process:451:11)
                                    npm ERR!     at Socket.emit (node:events:527:28)
                                    npm ERR!     at Pipe.<anonymous> (node:net:709:12)
                                    
                                    npm ERR! A complete log of this run can be found in:
                                    npm ERR!     /root/.npm/_logs/2022-06-20T20_38_06_117Z-debug-0.log
                                    
                                    pi@IOBroker $  sudo less /root/.npm/_logs/2022-06-20T20_38_06_117Z-debug-0.log
                                    
                                    28 verbose logfile /root/.npm/_logs/2022-06-20T20_38_06_117Z-debug-0.log
                                    29 timing npm:load:logFile Completed in 14ms
                                    30 timing npm:load:timers Completed in 0ms
                                    31 timing npm:load:configScope Completed in 0ms
                                    32 timing npm:load Completed in 79ms
                                    33 timing arborist:ctor Completed in 2ms
                                    34 silly logfile done cleaning log files
                                    35 timing build:queue Completed in 184ms
                                    36 info run iobroker.js-controller@4.0.23 preinstall node_modules/iobroker.js-controller node lib/preinstallCheck.js
                                    37 info run iobroker.js-controller@4.0.23 preinstall { code: 1, signal: null }
                                    38 timing command:rebuild Completed in 3501ms
                                    39 verbose stack Error: command failed
                                    39 verbose stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/lib/index.js:63:27)
                                    39 verbose stack     at ChildProcess.emit (node:events:527:28)
                                    39 verbose stack     at maybeClose (node:internal/child_process:1092:16)
                                    39 verbose stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
                                    40 verbose pkgid iobroker.js-controller@4.0.23
                                    41 verbose cwd /opt/iobroker
                                    42 verbose Linux 5.10.103-v7l+
                                    43 verbose node v16.15.1
                                    44 verbose npm  v8.12.2
                                    45 error code 1
                                    46 error path /opt/iobroker/node_modules/iobroker.js-controller
                                    47 error command failed
                                    48 error command sh -c node lib/preinstallCheck.js
                                    49 error NPM version:
                                    50 error /opt/iobroker/node_modules/iobroker.js-controller/lib/preinstallCheck.js:111
                                    50 error     if (v1.major > v2.major) {
                                    50 error            ^
                                    50 error
                                    50 error TypeError: Cannot read properties of null (reading 'major')
                                    50 error     at gt (/opt/iobroker/node_modules/iobroker.js-controller/lib/preinstallCheck.js:111:12)
                                    50 error     at gte (/opt/iobroker/node_modules/iobroker.js-controller/lib/preinstallCheck.js:191:12)
                                    50 error     at /opt/iobroker/node_modules/iobroker.js-controller/lib/preinstallCheck.js:40:29
                                    50 error     at ChildProcess.exithandler (node:child_process:406:5)
                                    50 error     at ChildProcess.emit (node:events:527:28)
                                    50 error     at maybeClose (node:internal/child_process:1092:16)
                                    50 error     at Socket.<anonymous> (node:internal/child_process:451:11)
                                    50 error     at Socket.emit (node:events:527:28)
                                    50 error     at Pipe.<anonymous> (node:net:709:12)
                                    51 verbose exit 1
                                    52 timing npm Completed in 3764ms
                                    53 verbose unfinished npm timer build 1655757488213
                                    54 verbose unfinished npm timer build:deps 1655757488214
                                    55 verbose unfinished npm timer build:run:preinstall 1655757488400
                                    56 verbose unfinished npm timer build:run:preinstall:node_modules/iobroker.js-controller 1655757488401
                                    57 verbose code 1
                                    58 error A complete log of this run can be found in:
                                    58 error     /root/.npm/_logs/2022-06-20T20_38_06_117Z-debug-0.log
                                    
                                    
                                    Thomas Braun Homoran 2 Replies Last reply Reply Quote 0
                                    • Thomas Braun
                                      Thomas Braun Most Active @Jokersmiler last edited by

                                      @jokersmiler

                                      Eigentlich sollte das jetzt in beiden Verzeichnissen komplett durchlaufen:

                                      cd /opt/iobroker 
                                      uname -m && which nodejs node npm && nodejs -v && node -v && npm -v && whoami && pwd && sudo apt update &> /dev/null && sudo apt update && apt policy nodejs
                                      cd ~
                                      uname -m && which nodejs node npm && nodejs -v && node -v && npm -v && whoami && pwd && sudo apt update &> /dev/null && sudo apt update && apt policy nodejs
                                      
                                      J 1 Reply Last reply Reply Quote 0
                                      • Thomas Braun
                                        Thomas Braun Most Active @Jokersmiler last edited by

                                        @jokersmiler sagte in NPM Fehler:

                                        sudo -H npm rebuild

                                        Wo kommt das denn jetzt her? Das ist Quark!

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

                                          @thomas-braun

                                          pi@IOBroker:~ $ cd /opt/iobroker
                                          pi@IOBroker:/opt/iobroker $ uname -m && which nodejs node npm && nodejs -v && node -v && npm -v && whoami && pwd && sudo apt update &> /dev/null && sudo apt update && apt policy nodejs
                                          armv7l
                                          /usr/bin/nodejs
                                          /usr/bin/node
                                          /usr/bin/npm
                                          v16.15.1
                                          v16.15.1
                                          
                                          pi@IOBroker:/opt/iobroker $ cd ~
                                          pi@IOBroker:~ $ uname -m && which nodejs node npm && nodejs -v && node -v && npm -v && whoami && pwd && sudo apt update &> /dev/null && sudo apt update && apt policy nodejs
                                          armv7l
                                          /usr/bin/nodejs
                                          /usr/bin/node
                                          /usr/bin/npm
                                          v16.15.1
                                          v16.15.1
                                          8.12.2
                                          pi
                                          /home/pi
                                          Hit:1 http://phoscon.de/apt/deconz buster InRelease
                                          Hit:2 http://raspbian.raspberrypi.org/raspbian buster InRelease
                                          Hit:3 http://archive.raspberrypi.org/debian buster InRelease
                                          Hit:4 https://deb.nodesource.com/node_16.x buster InRelease
                                          Reading package lists... Done
                                          Building dependency tree
                                          Reading state information... Done
                                          15 packages can be upgraded. Run 'apt list --upgradable' to see them.
                                          nodejs:
                                            Installed: 16.15.1-deb-1nodesource1
                                            Candidate: 16.15.1-deb-1nodesource1
                                            Version table:
                                           *** 16.15.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~deb10u1 500
                                                  500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages
                                          
                                          
                                          1 Reply Last reply Reply Quote 0
                                          • Homoran
                                            Homoran Global Moderator Administrators @Jokersmiler last edited by Homoran

                                            @jokersmiler sagte in NPM Fehler:

                                            error /root/.npm/_logs/2022-06-20T20_38_06_117Z-debug-0.log

                                            J 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

                                            911
                                            Online

                                            31.9k
                                            Users

                                            80.1k
                                            Topics

                                            1.3m
                                            Posts

                                            4
                                            52
                                            1779
                                            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