Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Error/Bug
    4. npm error bei allen Adaptern

    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

    SOLVED npm error bei allen Adaptern

    This topic has been deleted. Only users with topic management privileges can see it.
    • AlCalzone
      AlCalzone Developer @Bielefelder81 last edited by

      @Bielefelder81 sagte in npm error bei allen Adaptern:

      ^SyntaxError: Invalid or unexpected token

      Das hat in der Regel nur 2 Gründe:

      1. zu alte Node-Version (< 8 )
      2. oder SD-Karte macht gerade die Grätsche
      B 1 Reply Last reply Reply Quote 0
      • AlCalzone
        AlCalzone Developer @Andi888 last edited by

        @Andi888 Stop, eine Idee hätte ich noch.
        Nachdem du den Fixer ausgeführt hast:

        sudo -H -u iobroker npm cache verify
        

        und/oder

        sudo -H -u iobroker npm cache clean --force
        
        1 Reply Last reply Reply Quote 0
        • B
          Bielefelder81 @AlCalzone last edited by

          @AlCalzone

          Hi,

          1. Node = 10.20.1
          2. Hoffentlich nicht
          haselchen 1 Reply Last reply Reply Quote 0
          • haselchen
            haselchen Most Active @Bielefelder81 last edited by haselchen

            @Bielefelder81

            Ich geh immer nach Try and Error vor 😉
            Hier würde ich nach dem Canvas Fehler suchen.

            npm i canvas

            wäre mein nächster Schritt.
            Wie gesagt immer alles auf eigene Gefahr und Backup machen ganz wichtig.

            Vermutlich gibt es x Möglichkeiten deinen Fehler zu korrigieren.
            Da ich nen Container im Docker habe kann ich halt viel rumprobieren.

            AlCalzone 1 Reply Last reply Reply Quote 0
            • AlCalzone
              AlCalzone Developer @haselchen last edited by

              @haselchen canvas ist nicht das Problem, wenn du genau hinschaust. Der Fehler ist
              } ^SyntaxError: Invalid or unexpected token
              in der Datei /opt/iobroker/node_modules/semver/semver.js. Im Kommentarfeld sieht man auch, dass da ein unsichtbares Steuerzeichen (\u0002) ist, was meinen Verdacht einer kaputten SD-Karte weiter bestärkt.

              haselchen 1 Reply Last reply Reply Quote 0
              • haselchen
                haselchen Most Active @AlCalzone last edited by haselchen

                @AlCalzone

                Da bist Du eher der Experte.
                Ich hatte ähnliche Fehlermeldung mal mit dem Hinweis das die Datei schon existiert und man sie löschen soll und dann nochmal updaten.
                Insgesamt sind die Fehlermeldungen bei Iobroker tatsächlich noch Neuland für den Großteil der User.
                Schwierig vermutlich, aufgrund der Vielzahl der möglichen Meldungen, eine Doku zu erstellen mit Fehlerbehandlungen.

                AlCalzone 1 Reply Last reply Reply Quote 0
                • AlCalzone
                  AlCalzone Developer @haselchen last edited by

                  @haselchen Die Formatierung macht es nicht gerade einfacher, das zu erkennen.

                  @Bielefelder81 Du kannst versuchen, die Datei zu reparieren:

                  cd /opt/iobroker
                  npm i semver
                  

                  und dann die Adapter zu installieren. Aber aus meiner Erfahrung deutet so ein Fehler nur an, dass bald mehr kaputt geht. Wenn du nicht sofort die SD tauschen möchstest, empfehle ich dir daher dringend ein Backup.

                  B 1 Reply Last reply Reply Quote 0
                  • B
                    Bielefelder81 @AlCalzone last edited by

                    @AlCalzone

                    Das mit dem semver führte zu sehr vielen roten NPM Error 🙂

                    
                    > canvas@2.6.1 install /opt/iobroker/node_modules/canvas
                    > node-pre-gyp install --fallback-to-build
                    
                    node-pre-gyp WARN Using request for node-pre-gyp https download
                    node-pre-gyp WARN Tried to download(404): https://github.com/node-gfx/node-canvas-prebuilt/releases/download/v2.6.1/canvas-v2.6.1-node-v64-linux-glibc-arm.tar.gz
                    node-pre-gyp WARN Pre-built binaries not found for canvas@2.6.1 and node@10.20.1 (node-v64 ABI, glibc) (falling back to source compile with node-gyp)
                    Package pixman-1 was not found in the pkg-config search path.
                    Perhaps you should add the directory containing `pixman-1.pc'
                    to the PKG_CONFIG_PATH environment variable
                    No package 'pixman-1' found
                    gyp: Call to 'pkg-config pixman-1 --libs' returned exit status 1 while in binding.gyp. while trying to load binding.gyp
                    gyp ERR! configure error
                    gyp ERR! stack Error: `gyp` failed with exit code: 1
                    gyp ERR! stack     at ChildProcess.onCpExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
                    gyp ERR! stack     at ChildProcess.emit (events.js:198:13)
                    gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
                    gyp ERR! System Linux 4.19.97-v7+
                    gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/opt/iobroker/node_modules/canvas/build/Release/canvas.node" "--module_name=canvas" "--module_path=/opt/iobroker/node_modules/canvas/build/Release" "--napi_version=6" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v64"
                    gyp ERR! cwd /opt/iobroker/node_modules/canvas
                    gyp ERR! node -v v10.20.1
                    gyp ERR! node-gyp -v v5.1.0
                    gyp ERR! not ok
                    node-pre-gyp ERR! build error
                    node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/opt/iobroker/node_modules/canvas/build/Release/canvas.node --module_name=canvas --module_path=/opt/iobroker/node_modules/canvas/build/Release --napi_version=6 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v64' (1)
                    node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/opt/iobroker/node_modules/canvas/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
                    node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:198:13)
                    node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:982:16)
                    node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
                    node-pre-gyp ERR! System Linux 4.19.97-v7+
                    node-pre-gyp ERR! command "/usr/bin/node" "/opt/iobroker/node_modules/canvas/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
                    node-pre-gyp ERR! cwd /opt/iobroker/node_modules/canvas
                    node-pre-gyp ERR! node -v v10.20.1
                    node-pre-gyp ERR! node-pre-gyp -v v0.11.0
                    node-pre-gyp ERR! not ok
                    Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/opt/iobroker/node_modules/canvas/build/Release/canvas.node --module_name=canvas --module_path=/opt/iobroker/node_modules/canvas/build/Release --napi_version=6 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v64' (1)
                    npm WARN ajv-keywords@2.1.1 requires a peer of ajv@^5.0.0 but none is installed. You must install peer dependencies yourself.
                    npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.12 (node_modules/zigbee-herdsman/node_modules/fsevents):
                    npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.12: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})
                    
                    npm ERR! code ELIFECYCLE
                    npm ERR! errno 1
                    npm ERR! canvas@2.6.1 install: `node-pre-gyp install --fallback-to-build`
                    npm ERR! Exit status 1
                    npm ERR!
                    npm ERR! Failed at the canvas@2.6.1 install script.
                    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
                    
                    npm ERR! A complete log of this run can be found in:
                    npm ERR!     /home/iobroker/.npm/_logs/2020-04-26T12_49_24_986Z-debug.log
                    
                    AlCalzone 1 Reply Last reply Reply Quote 0
                    • AlCalzone
                      AlCalzone Developer @Bielefelder81 last edited by

                      @Bielefelder81 Die ganzen canvas-Errors sehen erst mal furchteinflößend aus, das ist aber nur eine optionale Abhängigkeit, die auf manchen Systemen nicht installierbar ist. Wenn es sonst keine Fehler gab, müsste semver eigentlich wieder vollständig drauf sein - also probier mal die Adapter-Installation.

                      B 1 Reply Last reply Reply Quote 0
                      • B
                        Bielefelder81 @AlCalzone last edited by

                        @AlCalzone
                        Na schauen wir mal... Ich habe jetzt mal den iot Adapter versucht zu updaten und es kam folgende Meldung.

                        $ ./iobroker upgrade iot
                        Update iot from @1.4.6 to @1.4.10
                        host.pi-iobroker Adapter "system.adapter.iot.0" is stopped.
                        NPM version: 6.14.4
                        npm install iobroker.iot@1.4.10 --loglevel error --prefix "/opt/iobroker" (System call)
                        Package pixman-1 was not found in the pkg-config search path.Perhaps you should add the directory containing `pixman-1.pc'to the PKG_CONFIG_PATH environment variableNo package 'pixman-1' found
                        gyp: Call to 'pkg-config pixman-1 --libs' returned exit status 1 while in binding.gyp. while trying to load binding.gyp
                        gyp
                         
                        ERR!
                         configure error
                         gyp ERR! stack Error: `gyp` failed with exit code: 1gyp ERR! stack     at ChildProcess.onCpExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)gyp ERR! stack     at ChildProcess.emit (events.js:198:13)gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
                        gyp ERR! System Linux 4.19.97-v7+gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/opt/iobroker/node_modules/canvas/build/Release/canvas.node" "--module_name=canvas" "--module_path=/opt/iobroker/node_modules/canvas/build/Release" "--napi_version=6" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v64"gyp ERR! cwd
                         /opt/iobroker/node_modules/canvasgyp ERR! node -v v10.20.1gyp ERR! node-gyp -v v5.1.0gyp ERR! not ok 
                        node-pre-gyp
                         ERR! build error 
                        node-pre-gyp
                         ERR!
                         stack Error: Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/opt/iobroker/node_modules/canvas/build/Release/canvas.node --module_name=canvas --module_path=/opt/iobroker/node_modules/canvas/build/Release --napi_version=6 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v64' (1)node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/opt/iobroker/node_modules/canvas/node_modules/node-pre-gyp/lib/util/compile.js:83:29)node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:198:13)node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:982:16)node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)node-pre-gyp ERR! System Linux 4.19.97-v7+node-pre-gyp ERR! command "/usr/bin/node" "/opt/iobroker/node_modules/canvas/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"node-pre-gyp ERR! cwd /opt/iobroker/node_modules/canvasnode-pre-gyp ERR! node -v v10.20.1node-pre-gyp ERR! node-pre-gyp -v v0.11.0node-pre-gyp ERR! not ok 
                        npm
                         ERR! code ELIFECYCLEnpm ERR! errno 1npm
                         ERR! canvas@2.6.1 install: `node-pre-gyp install --fallback-to-build`npm ERR! Exit status 1npm ERR! npm ERR! Failed at the canvas@2.6.1 install script.npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
                        
                        npm ERR! A complete log of this run can be found in:npm ERR!     /home/iobroker/.npm/_logs/2020-04-26T16_36_44_161Z-debug.log
                        upload [20] iot.admin /opt/iobroker/node_modules/iobroker.iot/admin/static/js/runtime-main.8b3eca34.js.map static/js/runtime-main.8b3eca34.js.map application/json
                        upload [19] iot.admin /opt/iobroker/node_modules/iobroker.iot/admin/static/js/runtime-main.8b3eca34.js static/js/runtime-main.8b3eca34.js application/javascript
                        upload [18] iot.admin /opt/iobroker/node_modules/iobroker.iot/admin/static/js/main.ac1c3d42.chunk.js.map static/js/main.ac1c3d42.chunk.js.map application/json
                        upload [17] iot.admin /opt/iobroker/node_modules/iobroker.iot/admin/static/js/main.ac1c3d42.chunk.js static/js/main.ac1c3d42.chunk.js application/javascript
                        upload [16] iot.admin /opt/iobroker/node_modules/iobroker.iot/admin/static/js/2.80efc66d.chunk.js.map static/js/2.80efc66d.chunk.js.map application/json
                        upload [15] iot.admin /opt/iobroker/node_modules/iobroker.iot/admin/static/js/2.80efc66d.chunk.js.LICENSE.txt static/js/2.80efc66d.chunk.js.LICENSE.txt text/plain
                        upload [14] iot.admin /opt/iobroker/node_modules/iobroker.iot/admin/static/js/2.80efc66d.chunk.js static/js/2.80efc66d.chunk.js application/javascript
                        upload [13] iot.admin /opt/iobroker/node_modules/iobroker.iot/admin/static/css/main.d4bed9c6.chunk.css.map static/css/main.d4bed9c6.chunk.css.map application/json
                        upload [12] iot.admin /opt/iobroker/node_modules/iobroker.iot/admin/static/css/main.d4bed9c6.chunk.css static/css/main.d4bed9c6.chunk.css text/css
                        upload [11] iot.admin /opt/iobroker/node_modules/iobroker.iot/admin/static/css/2.0302007b.chunk.css.map static/css/2.0302007b.chunk.css.map application/json
                        upload [10] iot.admin /opt/iobroker/node_modules/iobroker.iot/admin/static/css/2.0302007b.chunk.css static/css/2.0302007b.chunk.css text/css
                        upload [9] iot.admin /opt/iobroker/node_modules/iobroker.iot/admin/service-worker.js service-worker.js application/javascript
                        upload [8] iot.admin /opt/iobroker/node_modules/iobroker.iot/admin/precache-manifest.947cb21c995d58e8de9a86c4709adcc5.js precache-manifest.947cb21c995d58e8de9a86c4709adcc5.js application/javascript
                        upload [7] iot.admin /opt/iobroker/node_modules/iobroker.iot/admin/manifest.json manifest.json application/json
                        upload [6] iot.admin /opt/iobroker/node_modules/iobroker.iot/admin/iot.png iot.png image/png
                        upload [5] iot.admin /opt/iobroker/node_modules/iobroker.iot/admin/index_m.html index_m.html text/html
                        upload [4] iot.admin /opt/iobroker/node_modules/iobroker.iot/admin/favicon.ico favicon.ico image/vnd.microsoft.icon
                        upload [3] iot.admin /opt/iobroker/node_modules/iobroker.iot/admin/blockly.js blockly.js application/javascript
                        upload [2] iot.admin /opt/iobroker/node_modules/iobroker.iot/admin/asset-manifest.json asset-manifest.json application/json
                        upload [1] iot.admin /opt/iobroker/node_modules/iobroker.iot/admin/alexalogo.png alexalogo.png image/png
                        upload [0] iot.admin /opt/iobroker/node_modules/iobroker.iot/admin/actions.js actions.js application/javascript
                        Adapter "iot" updated
                        host.pi-iobroker Adapter "system.adapter.iot.0" is started
                        process exited with code 0
                        

                        Erst verschwindet das Update von der Liste, die Zahl der zu aktualisierenden Updates bleibt gleich... Wenn ich dann die Seite wechsel und wieder zurück zu den Adaptern komme ist er aber trotzdem wieder da.

                        Naja... Irgendwas hat sich kaputt gestanden. Habe schon Wochen nichts mehr am iobroker verändert.

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

                          Naja du hast 1.4.10 installiert aber 1.4.11 gibts jetzt schon. Kann sein das er nach dem Update erst Repo aktualisiert hat?

                          B 1 Reply Last reply Reply Quote 0
                          • B
                            Bielefelder81 @apollon77 last edited by

                            @apollon77 Als verfügbare Version wir mir immer noch nur 1.4.10 angezeigt. Wechsel von 1.4.6 auf 1.4.10

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

                              Sorry my fault ... 1.4.11 ist nich nicht draussen

                              1 Reply Last reply Reply Quote 0
                              • apollon77
                                apollon77 @Bielefelder81 last edited by

                                @Bielefelder81 Andere Frage: Welcher js-controller?

                                B 1 Reply Last reply Reply Quote 0
                                • B
                                  Bielefelder81 @apollon77 last edited by

                                  @apollon77 2.2.9

                                  Ich hatte bereits versucht auch dort upzudaten, aber auch ohne Erfolg.

                                  B 1 Reply Last reply Reply Quote 0
                                  • B
                                    Bielefelder81 @Bielefelder81 last edited by Bielefelder81

                                    Update js-controller from @2.2.9 to @3.0.19
                                    NPM version: 6.14.4
                                    npm install iobroker.js-controller@3.0.19 --unsafe-perm --loglevel error --prefix "/opt/iobroker" (System call)
                                    Package pixman-1 was not found in the pkg-config search path.
                                    Perhaps you should add the directory containing `pixman-1.pc'
                                    to the PKG_CONFIG_PATH environment variable
                                    No package 'pixman-1' found
                                    gyp: Call to 'pkg-config pixman-1 --libs' returned exit status 1 while in binding.gyp. while trying to load binding.gyp
                                    gyp ERR! configure error
                                    gyp ERR! stack Error: `gyp` failed with exit code: 1
                                    gyp ERR! stack     at ChildProcess.onCpExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
                                    gyp ERR! stack     at ChildProcess.emit (events.js:198:13)
                                    gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
                                    gyp ERR! System Linux 4.19.97-v7+
                                    gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/opt/iobroker/node_modules/canvas/build/Release/canvas.node" "--module_name=canvas" "--module_path=/opt/iobroker/node_modules/canvas/build/Release" "--napi_version=6" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v64"
                                    gyp ERR! cwd /opt/iobroker/node_modules/canvas
                                    gyp ERR! node -v v10.20.1
                                    gyp ERR! node-gyp -v v5.1.0
                                    gyp ERR! not ok
                                    node-pre-gyp ERR! build error
                                    node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/opt/iobroker/node_modules/canvas/build/Release/canvas.node --module_name=canvas --module_path=/opt/iobroker/node_modules/canvas/build/Release --napi_version=6 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v64' (1)
                                    node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/opt/iobroker/node_modules/canvas/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
                                    node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:198:13)
                                    node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:982:16)
                                    node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
                                    node-pre-gyp ERR! System Linux 4.19.97-v7+
                                    node-pre-gyp ERR! command "/usr/bin/node" "/opt/iobroker/node_modules/canvas/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
                                    node-pre-gyp ERR! cwd /opt/iobroker/node_modules/canvas
                                    node-pre-gyp ERR! node -v v10.20.1
                                    node-pre-gyp ERR! node-pre-gyp -v v0.11.0
                                    node-pre-gyp ERR! not ok
                                    npm ERR! code ELIFECYCLE
                                    npm ERR! errno 1
                                    npm ERR! canvas@2.6.1 install: `node-pre-gyp install --fallback-to-build`
                                    npm ERR! Exit status 1
                                    npm ERR!
                                    npm ERR! Failed at the canvas@2.6.1 install script.
                                    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
                                    
                                    npm ERR! A complete log of this run can be found in:
                                    npm ERR!     /home/iobroker/.npm/_logs/2020-04-27T06_42_53_525Z-debug.log
                                    Starting node restart.js
                                    

                                    Jetzt steht verfügbar 3.0.19 und vorhanden auch...
                                    Trotzdem steht ne 1 in iobroker unter Hosts...

                                    Teste jetzt mal die Adapter installationen.

                                    AlCalzone 1 Reply Last reply Reply Quote 0
                                    • AlCalzone
                                      AlCalzone Developer @Bielefelder81 last edited by

                                      @Bielefelder81 sagte in npm error bei allen Adaptern:

                                      Trotzdem steht ne 1 in iobroker unter Hosts

                                      Ja das geht erst weg, wenn du die Admin-Seite komplett neu lädst.
                                      https://github.com/ioBroker/ioBroker.admin/issues/499

                                      AlCalzone created this issue in ioBroker/ioBroker.admin

                                      closed [1] on hosts tab does not disappear after update #499

                                      B 1 Reply Last reply Reply Quote 0
                                      • B
                                        Bielefelder81 @AlCalzone last edited by Bielefelder81

                                        Hat leider alles nichts geholfen.
                                        Trotzdem vielen Dank an alle für die Hilfe.

                                        1 Reply Last reply Reply Quote 0
                                        • First post
                                          Last post

                                        Support us

                                        ioBroker
                                        Community Adapters
                                        Donate

                                        637
                                        Online

                                        31.8k
                                        Users

                                        80.0k
                                        Topics

                                        1.3m
                                        Posts

                                        npm error
                                        5
                                        25
                                        5824
                                        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