Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Error/Bug
    4. [gelöst] Canvas - compiled against a different Node.js vers,

    NEWS

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    [gelöst] Canvas - compiled against a different Node.js vers,

    This topic has been deleted. Only users with topic management privileges can see it.
    • mickym
      mickym Most Active @anno171986 last edited by

      @anno171986 Dann schau doch mal, ob Du jetzt mit

      iob upgrade
      

      was aktualisieren kannst.

      A 1 Reply Last reply Reply Quote 0
      • A
        anno171986 @mickym last edited by anno171986

        @mickym

        Nein

        pi@raspberrypi:/opt/iobroker$ iob upgrade
        All adapters are up to date
        

        Aber das Problem war ja kein Adapter sondern canvas. Das scheint jetzt ganz weg zu sein:

        pi@raspberrypi:/opt/iobroker$ cd /opt/iobroker/node_modules
        pi@raspberrypi:/opt/iobroker/node_modules$ npm ls canvas
        iobroker.core@1.0.0 /opt/iobroker
        └── (empty)
        

        Ich werde den den Rpi neustarten und gucken was der iobroker so sagt und was dann beim ausführen vom Skript passiert.

        mickym 1 Reply Last reply Reply Quote 0
        • mickym
          mickym Most Active @anno171986 last edited by mickym

          @anno171986 Also was ich bisschen eigenartig finde, ist

          1. das Dein header so komplett anders ist, als bei mir.
          2. das heißt, dass Du einfach keinen sauberen Baum hast. Letzter kann aber auch daher kommen, dass entweder ein Adapter oder Du selbst über den JS-Adapter alte nodejs Module installierst, die Dir dann so einen unsauberen Baum generieren. Ich habe das festgestellt, wenn man beispielsweise die moments Bibliothek im JS Adapter nachinstalliert.

          Dieses canvas wird ja meines Erachtens nur zum Zeichnen von irgendwelchen Karten benötigt?

          EDIT:
          Ich würde halt auch mal die beiden github Versionen, vom zigbee und vom sourceanlytics Adapter gegen richtige Versionen tauschen.

          A 1 Reply Last reply Reply Quote 0
          • A
            anno171986 @mickym last edited by

            @mickym Ich weiß nicht, wo der unterschiedliche "name" in dem Header her kommt.

            Gute NAchricht, iobroker scheint zu laufen, alle Adapter grün. Ja, ich möchte canvas benutzen um ein Bild aus einem eChart zu erstellen und mir das dann per Telegram zuschicken zu lassen.

            Jetzt kommt folgender Fehler:

            	Cannot find required modules: Error: Cannot find module 'canvas'Require stack:- /opt/iobroker/node_modules/iobroker.echarts/main.js
            

            canvas scheint als weg, schon mal nicht schlecht. Frage: Wie installiere ich es jetzt richtig?

            mickym 1 Reply Last reply Reply Quote 0
            • mickym
              mickym Most Active @anno171986 last edited by

              @anno171986 Ich würde erstmal versuchen - den echarts Adapter nochmal zu installieren - weiss nicht ob Du schon daten hast.

              A 1 Reply Last reply Reply Quote 0
              • A
                anno171986 last edited by

                @mickym

                So ging es schonmal nicht:

                pi@raspberrypi:/opt/iobroker$ cd /opt/iobroker
                pi@raspberrypi:/opt/iobroker$ npm install canvas
                npm ERR! code 1
                npm ERR! path /opt/iobroker/node_modules/canvas
                npm ERR! command failed
                npm ERR! command sh -c -- node-pre-gyp install --fallback-to-build --update-binary
                npm ERR! Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js clean' (1)
                npm ERR! node-pre-gyp info it worked if it ends with ok
                npm ERR! node-pre-gyp info using node-pre-gyp@1.0.10
                npm ERR! node-pre-gyp info using node@16.18.1 | linux | arm
                npm ERR! node-pre-gyp http GET https://github.com/Automattic/node-canvas/releases/download/v2.10.2/canvas-v2.10.2-node-v93-linux-glibc-arm.tar.gz
                npm ERR! node-pre-gyp ERR! install response status 404 Not Found on https://github.com/Automattic/node-canvas/releases/download/v2.10.2/canvas-v2.10.2-node-v93-linux-glibc-arm.tar.gz
                npm ERR! node-pre-gyp WARN Pre-built binaries not installable for canvas@2.10.2 and node@16.18.1 (node-v93 ABI, glibc) (falling back to source compile with node-gyp)
                npm ERR! node-pre-gyp WARN Hit error response status 404 Not Found on https://github.com/Automattic/node-canvas/releases/download/v2.10.2/canvas-v2.10.2-node-v93-linux-glibc-arm.tar.gz
                npm ERR! node:internal/modules/cjs/loader:988
                npm ERR!   throw err;
                npm ERR!   ^
                npm ERR!
                npm ERR! Error: Cannot find module 'object-assign'
                npm ERR! Require stack:
                npm ERR! - /usr/lib/node_modules/npm/node_modules/node-gyp/node_modules/gauge/render-template.js
                npm ERR! - /usr/lib/node_modules/npm/node_modules/node-gyp/node_modules/gauge/plumbing.js
                npm ERR! - /usr/lib/node_modules/npm/node_modules/node-gyp/node_modules/gauge/index.js
                npm ERR! - /usr/lib/node_modules/npm/node_modules/node-gyp/node_modules/npmlog/log.js
                npm ERR! - /usr/lib/node_modules/npm/node_modules/node-gyp/lib/node-gyp.js
                npm ERR! - /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js
                npm ERR!     at Function.Module._resolveFilename (node:internal/modules/cjs/loader:985:15)
                npm ERR!     at Function.Module._load (node:internal/modules/cjs/loader:833:27)npm ERR!     at Module.require (node:internal/modules/cjs/loader:1057:19)
                npm ERR!     at require (node:internal/modules/cjs/helpers:103:18)
                npm ERR!     at Object.<anonymous> (/usr/lib/node_modules/npm/node_modules/node-gyp/node_modules/gauge/render-template.js:4:20)
                npm ERR!     at Module._compile (node:internal/modules/cjs/loader:1155:14)
                npm ERR!     at Object.Module._extensions..js (node:internal/modules/cjs/loader:1209:10)
                npm ERR!     at Module.load (node:internal/modules/cjs/loader:1033:32)
                npm ERR!     at Function.Module._load (node:internal/modules/cjs/loader:868:12)npm ERR!     at Module.require (node:internal/modules/cjs/loader:1057:19) {
                npm ERR!   code: 'MODULE_NOT_FOUND',
                npm ERR!   requireStack: [
                npm ERR!     '/usr/lib/node_modules/npm/node_modules/node-gyp/node_modules/gauge/render-template.js',
                npm ERR!     '/usr/lib/node_modules/npm/node_modules/node-gyp/node_modules/gauge/plumbing.js',
                npm ERR!     '/usr/lib/node_modules/npm/node_modules/node-gyp/node_modules/gauge/index.js',
                npm ERR!     '/usr/lib/node_modules/npm/node_modules/node-gyp/node_modules/npmlog/log.js',
                npm ERR!     '/usr/lib/node_modules/npm/node_modules/node-gyp/lib/node-gyp.js',npm ERR!     '/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js'
                npm ERR!   ]
                npm ERR! }
                npm ERR! node-pre-gyp ERR! build error
                npm ERR! 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 clean' (1)
                npm ERR! node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/opt/iobroker/node_modules/@mapbox/node-pre-gyp/lib/util/compile.js:89:23)
                npm ERR! node-pre-gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
                npm ERR! node-pre-gyp ERR! stack     at maybeClose (node:internal/child_process:1100:16)
                npm ERR! node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:304:5)
                npm ERR! node-pre-gyp ERR! System Linux 5.10.103-v7l+
                npm ERR! node-pre-gyp ERR! command "/usr/bin/node" "/opt/iobroker/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--update-binary"
                npm ERR! node-pre-gyp ERR! cwd /opt/iobroker/node_modules/canvas
                npm ERR! node-pre-gyp ERR! node -v v16.18.1
                npm ERR! node-pre-gyp ERR! node-pre-gyp -v v1.0.10
                npm ERR! node-pre-gyp ERR! not ok
                
                npm ERR! A complete log of this run can be found in:
                npm ERR!     /home/pi/.npm/_logs/2022-11-20T14_47_51_909Z-debug-0.log
                

                Werde dann man den eCharts Adapter neu installieren

                1 Reply Last reply Reply Quote 0
                • A
                  anno171986 @mickym last edited by

                  @mickym Auch nach der De- und Neuinstallation von eCahrts sieht es so aus:

                  pi@raspberrypi:/opt/iobroker$ npm list canvas
                  iobroker.core@1.0.0 /opt/iobroker
                  └── (empty)
                  
                  pi@raspberrypi:/opt/iobroker$ cd /opt/iobroker/node_modules
                  pi@raspberrypi:/opt/iobroker/node_modules$ npm list canvas
                  iobroker.core@1.0.0 /opt/iobroker
                  └── (empty)
                  

                  Skript gibt den selben Fehler aus:

                  Cannot find required modules: Error: Cannot find module 'canvas'Require stack:- /opt/iobroker/node_modules/iobroker.echarts/main.js
                  
                  mickym 1 Reply Last reply Reply Quote 0
                  • mickym
                    mickym Most Active @anno171986 last edited by mickym

                    @anno171986 Na ich sehe Du bist auch noch auf buster und altem Betriebssystem. Man könnte nochmal versuchen, dass komplette nodejs runterzuschmeissen und neu zu installieren. Im Prinzip scheitert die Installation vom dem canvas ja an irgendeinem Module der node-js.

                    Wie gesagt - wenn Du eh nichts mehr zu verlieren hast, würde ich das noch versuchen.
                    Also iob stoppen - nodejs deinstallieren die ganzen npm Verzeichnisse manuell löschen und nodejs neu installieren.

                    also

                    sudo apt remove nodejs
                    

                    dann schauen, ob

                    nodejs -v 
                    npm -v
                    

                    keine Ausgaben mehr liefert und unter /usr/lib keine node_modules Verzeichnis mehr gibt.

                    Wenn alles weg ist - dann mit

                    sudo apt install nodejs
                    

                    wieder installieren

                    Ich habe den echarts Adapter auf meiner Testmaschine installiert ohne Probleme - das canvas Verzeichnis taucht dann auch auf. Also wie gesagt denke ich, dass da irgendwas uralt ist, deswegen bekommst Du da auch keinen schönen Baum hin. - Ab jetzt bin ich mit meiner Weisheit denke ich auch am Ende.

                    A 3 Replies Last reply Reply Quote 0
                    • A
                      anno171986 @mickym last edited by

                      @mickym Hatte ein Systemupdate nach der Anleitungt versucht, klappt aber auch nicht 😞

                      mickym 1 Reply Last reply Reply Quote 0
                      • mickym
                        mickym Most Active @anno171986 last edited by mickym

                        @anno171986 sagte in Canvas -> compiled against a different Node.js version:

                        @mickym Hatte ein Systemupdate nach der Anleitungt versucht, klappt aber auch nicht 😞

                        Wie gesagt probier mal node-js neu zu installieren - iob stoppen.

                        Das gesamte Update von buster auf bullseye versuche lieber die Anleitung von @Thomas-Braun

                        https://forum.iobroker.net/topic/47213/upgrade-von-debian-10-buster-auf-11-bullseye

                        Ich hab zumindest auf meiner Testmaschine mal nodejs komplett runtergeschmissen und neu installiert und das hat funktioniert.

                        A 1 Reply Last reply Reply Quote 0
                        • A
                          anno171986 @mickym last edited by

                          @mickym Das Update auf bullseye hat er jetzt nach der Anleitung von @Thomas-Braun thomas gemacht.

                          mickym 1 Reply Last reply Reply Quote 0
                          • mickym
                            mickym Most Active @anno171986 last edited by

                            @anno171986 Na das ist doch schon mal gut - wie sieht die nodejs Version aus, hast Du die nodesource.list auch editiert

                            A 1 Reply Last reply Reply Quote 0
                            • A
                              anno171986 @mickym last edited by

                              @mickym

                              pi@raspberrypi:/opt/iobroker$ which nodejs && nodejs -v && which node && node -v && which npm && npm -v && apt policy nodejs
                              /usr/bin/nodejs
                              v16.18.1
                              /usr/bin/node
                              v16.18.1
                              /usr/bin/npm
                              8.19.2
                              nodejs:
                                Installiert:           16.18.1-deb-1nodesource1
                                Installationskandidat: 16.18.1-deb-1nodesource1
                                Versionstabelle:
                               *** 16.18.1-deb-1nodesource1 500
                                      500 https://deb.nodesource.com/node_16.x bullseye/main armhf Packages
                                      100 /var/lib/dpkg/status
                                   12.22.12~dfsg-1~deb11u1 500
                                      500 http://raspbian.raspberrypi.org/raspbian bullseye/main armhf Packages
                              

                              Das mit dem nodejs habe ich noch nicht gemacht. Habe jetzt öeider auch keine Zeit mehr. Muss dann morgen Abend weiter versuchen

                              mickym 1 Reply Last reply Reply Quote 0
                              • mickym
                                mickym Most Active @anno171986 last edited by

                                @anno171986 Na vielleicht gehts ja auch so schon

                                A 1 Reply Last reply Reply Quote 0
                                • A
                                  anno171986 @mickym last edited by

                                  @mickym Nein, leider nicht. Auch Neuinstallation von echarts ädnert nichts. Er scheint canvas nicht zu installieren und auch manuell geht es nicht.

                                  Nach dem Update auf Bullseye geht mein SQl Adapter nicht mehr. Irgendwas ist mit der Datenbank "kaputt". Komme auch nicht mit HEidiSQL mehr drauf

                                  mickym 1 Reply Last reply Reply Quote 0
                                  • mickym
                                    mickym Most Active @anno171986 last edited by

                                    @anno171986 Na dann musst erst mal schauen, ob die mysql Service läuft.

                                    Schau mal

                                    systemctl status mysql
                                    
                                    A 1 Reply Last reply Reply Quote 0
                                    • A
                                      anno171986 @mickym last edited by

                                      @mickym said in Canvas -> compiled against a different Node.js version:

                                      systemctl status mysql

                                      pi@raspberrypi:~$ systemctl status mysql
                                      ● mariadb.service - MariaDB 10.5.15 database server
                                           Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
                                           Active: active (running) since Sun 2022-11-20 17:40:49 CET; 24min ago
                                             Docs: man:mariadbd(8)
                                                   https://mariadb.com/kb/en/library/systemd/
                                          Process: 545 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
                                          Process: 555 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
                                          Process: 576 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= ||   VAR=`cd /usr/bin/..; /usr/bin/galera_recovery`; [ $? -eq 0 ]   && systemctl set>
                                          Process: 685 ExecStartPost=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
                                          Process: 688 ExecStartPost=/etc/mysql/debian-start (code=exited, status=0/SUCCESS)
                                         Main PID: 665 (mariadbd)
                                           Status: "Taking your SQL requests now..."
                                            Tasks: 8 (limit: 4915)
                                              CPU: 2.701s
                                           CGroup: /system.slice/mariadb.service
                                                   └─665 /usr/sbin/mariadbd
                                      
                                      Nov 20 17:40:49 raspberrypi systemd[1]: Started MariaDB 10.5.15 database server.
                                      Nov 20 17:40:49 raspberrypi /etc/mysql/debian-start[690]: Upgrading MySQL tables if necessary.
                                      Nov 20 17:40:49 raspberrypi /etc/mysql/debian-start[693]: /usr/bin/mysql_upgrade: the '--basedir' option is always ignored
                                      Nov 20 17:40:49 raspberrypi /etc/mysql/debian-start[693]: Looking for 'mysql' as: /usr/bin/mysql
                                      Nov 20 17:40:49 raspberrypi /etc/mysql/debian-start[693]: Looking for 'mysqlcheck' as: /usr/bin/mysqlcheck
                                      Nov 20 17:40:49 raspberrypi /etc/mysql/debian-start[693]: This installation of MariaDB is already upgraded to 10.5.15-MariaDB.
                                      Nov 20 17:40:49 raspberrypi /etc/mysql/debian-start[693]: There is no need to run mysql_upgrade again for 10.5.15-MariaDB.
                                      Nov 20 17:40:49 raspberrypi /etc/mysql/debian-start[693]: You can use --force if you still want to run mysql_upgrade
                                      Nov 20 17:40:49 raspberrypi /etc/mysql/debian-start[701]: Checking for insecure root accounts.
                                      Nov 20 17:40:49 raspberrypi /etc/mysql/debian-start[705]: Triggering myisam-recover for all MyISAM tables and aria-recover for all Aria tables
                                      

                                      Scheint zu laufen. Jetzt muss ich wirklich los

                                      mickym 1 Reply Last reply Reply Quote 0
                                      • mickym
                                        mickym Most Active @anno171986 last edited by

                                        @anno171986 Ok - dann viel Spaß.

                                        1 Reply Last reply Reply Quote 0
                                        • A
                                          anno171986 @mickym last edited by

                                          @mickym said in Canvas -> compiled against a different Node.js version:

                                          @anno171986 Na ich sehe Du bist auch noch auf buster und altem Betriebssystem. Man könnte nochmal versuchen, dass komplette nodejs runterzuschmeissen und neu zu installieren. Im Prinzip scheitert die Installation vom dem canvas ja an irgendeinem Module der node-js.

                                          Wie gesagt - wenn Du eh nichts mehr zu verlieren hast, würde ich das noch versuchen.
                                          Also iob stoppen - nodejs deinstallieren die ganzen npm Verzeichnisse manuell löschen und nodejs neu installieren.

                                          also

                                          sudo apt remove nodejs
                                          

                                          dann schauen, ob

                                          nodejs -v 
                                          npm -v
                                          

                                          keine Ausgaben mehr liefert und unter /usr/lib keine node_modules Verzeichnis mehr gibt.

                                          Wenn alles weg ist - dann mit

                                          sudo apt install nodejs
                                          

                                          wieder installieren

                                          Ich habe den echarts Adapter auf meiner Testmaschine installiert ohne Probleme - das canvas Verzeichnis taucht dann auch auf. Also wie gesagt denke ich, dass da irgendwas uralt ist, deswegen bekommst Du da auch keinen schönen Baum hin. - Ab jetzt bin ich mit meiner Weisheit denke ich auch am Ende.

                                          Ich probiere jetzt erstmal das mit nodejs zu machen. DIe MySQl DAtenbank sehe ich erstmal als nachgelagert Problem an.

                                          1 Reply Last reply Reply Quote 0
                                          • A
                                            anno171986 @mickym last edited by

                                            @mickym Es gibt noch einen node_modules Ordner in /usr/lib/.

                                            pi@raspberrypi:/usr/lib/node_modules$ ls
                                            n  node-gyp  npm
                                            

                                            Einfach mit

                                            rm node_modules
                                            

                                            löschen?

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            677
                                            Online

                                            31.7k
                                            Users

                                            79.7k
                                            Topics

                                            1.3m
                                            Posts

                                            4
                                            103
                                            6760
                                            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