Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. ioBroker Allgemein
    4. Cannot find module '@iobroker/types'

    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

    Cannot find module '@iobroker/types'

    This topic has been deleted. Only users with topic management privileges can see it.
    • mcm1957
      mcm1957 @Nordischerjung last edited by

      @nordischerjung

      Das Problem liegt an NPM 6. npm 6 installiert peer dependencies nicht. Bei adaptern die bereits adapter-core 3.x.x benutzen wird @iobroker/types daher nicht installiert und fehlt.

      Node 14 ist allerdings nicht mehr supported. Aktualisisere node auf >=16 und installiere den Adapter neu.

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

        @mcm57 @mcm57

        Da stimmt aber offenbar noch mehr nicht:

        2023-08-07 22:56:26.602  - error: host.raspberrypi Caught by controller[0]: Node.js v18.13.0
        

        Wo kommt die 18.13.0 nun her?
        Dringend die Installation von nodejs prüfen, da scheint mir einiges schief zu hängen.

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

          @thomas-braun
          Ok und keine Ahnung. 🙂
          Ich bin von den Versionen im ersten Posting ausgegangen.

          Es ist so, dass adapter-core 3.x.x (konkret und aktuell 3.0.3) nun peerDependency nutzt um @iobroker/types einzubinden. Allerdings werden peer dependencies erst ab npm 7 (d.h. de facto ab node 18) im Bedarfsfall automatisch installiert.

          Dies ist zumindest mein Wissensstand. Im Bedarfsfall foxriver76 pingen der weiß da genauer Bescheid.

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

            @mcm57

            Eigentlich kein Problem, lautet die aktuelle Empfehlung doch ohnehin auf nodejs@18 zu fahren. Wer der Empfehlung nicht folgt muss halt mit den Auswirkungen leben.

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

              @thomas-braun
              Wir aber auch 🙂

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

                @mcm57

                Man könnte ja überlegen nodejs@18 als minimal Voraussetzung zu definieren.

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

                  @thomas-braun
                  16 würde reichen.
                  Nur müsste das jeder adapter machen wenn ich es richtigcverstanden habe.

                  Ist aber etwas das ggF mit foxriver76 besser zu besprechen wäre. Ich weiss zu wenig wo wer welche dependencies checkt.

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

                    @mcm57 sagte in Cannot find module '@iobroker/types':

                    Nur müsste das jeder adapter machen wenn ich es richtigcverstanden habe.

                    Wenn die Dependency in einen der zentralen Adapter (js-controller oder admin) reingezogen wird haste alles andere gleich mit abgedeckt.

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

                      @thomas-braun

                      Nicht wirklich.
                      Weil wenn heute adapter xyz aktualisiert wird benötigt der weder einen neuen Admin noch js-controller 5. Trotzdem kann er adapter-core 3.0.3 beinhalgen und daher npm6 nicht vertragen.

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

                        @mcm57

                        Naja, man könnte aber halt dennoch durch 'sanften Druck' an einem core adapter insgesamt eine stärkere Verbreitung von nodejs > 16 forcieren.
                        Sollte man auch imho, nodejs@16 verliert in wenigen Wochen den Support vom Projekt.

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

                          @thomas-braun

                          
                          
                          ======================= SUMMARY =======================
                                               v.2023-04-16
                          
                          
                          Operatingsystem:        Raspbian GNU/Linux 10 (buster)
                          Kernel:                 5.10.103-v7l+
                          Installation:           Native
                          Timezone:               Europe/Berlin (CEST, +0200)
                          User-ID:                1000
                          X-Server:               false
                          Boot Target:            graphical.target
                          
                          Pending OS-Updates:     0
                          Pending iob updates:    8
                          
                          Nodejs-Installation:    /usr/bin/nodejs         v14.21.3
                                                  /home/pi/.nvm/versions/node/v14.17.3/bin/node           v14.17.3
                                                  /home/pi/.nvm/versions/node/v14.17.3/bin/npm            6.14.13
                                                  /home/pi/.nvm/versions/node/v14.17.3/bin/npx            6.14.13
                          
                          Recommended versions are nodejs 18.x.y and npm 9.x.y
                          *** nodejs is NOT correctly installed ***
                          
                          MEMORY: 
                                        total        used        free      shared  buff/cache   available
                          Mem:           3.8G        1.2G        1.1G         26M        1.5G        2.6G
                          Swap:           99M          0B         99M
                          Total:         3.9G        1.2G        1.2G
                          
                          Active iob-Instances:   16
                          Active repo(s): beta
                          
                          ioBroker Core:          js-controller           5.0.11
                                                  admin                   6.6.5
                          
                          ioBroker Status:        iobroker is running on this host.
                          
                          
                          Objects type: jsonl
                          States  type: jsonl
                          
                          Status admin and web instance:
                            system.adapter.admin.0                  : admin                 : raspberrypi                              -  enabled, port: 8081, bind: 0.0.0.0, run as: admin
                          
                          Objects:                10802
                          States:                 6279
                          
                          Size of iob-Database:
                          
                          21M     /opt/iobroker/iobroker-data/objects.jsonl
                          6.1M    /opt/iobroker/iobroker-data/objects.json.migrated
                          6.1M    /opt/iobroker/iobroker-data/objects.json.bak.migrated
                          12K     /opt/iobroker/iobroker-data/objects.json.old
                          2.4M    /opt/iobroker/iobroker-data/states.jsonl
                          2.0M    /opt/iobroker/iobroker-data/states.json.old
                          636K    /opt/iobroker/iobroker-data/states.json.migrated
                          636K    /opt/iobroker/iobroker-data/states.json.bak.migrated
                          0       /opt/iobroker/iobroker-data/states.json.broken
                          
                          
                          
                          =================== END OF SUMMARY ====================
                          

                          Also muss ich nodeJS neu installieren?

                          DJMarc75 Thomas Braun 2 Replies Last reply Reply Quote 0
                          • DJMarc75
                            DJMarc75 @00000x last edited by

                            @00000x sagte in Cannot find module '@iobroker/types':

                            Nodejs-Installation: /usr/bin/nodejs v14.21.3
                            /home/pi/.nvm/versions/node/v14.17.3/bin/node v14.17.3
                            /home/pi/.nvm/versions/node/v14.17.3/bin/npm 6.14.13
                            /home/pi/.nvm/versions/node/v14.17.3/bin/npx 6.14.13

                            steinalt und dazu noch Betauser ???

                            @00000x sagte in Cannot find module '@iobroker/types':

                            js-controller 5.0.11

                            warum ?

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

                              @00000x sagte in Cannot find module '@iobroker/types':

                              buster

                              Tot, Nachfolger installieren, wenn möglich in der 64Bit-Version.

                              Und nodejs wird immer per systemeigenen Paketmanager installiert, nie per n, nvm oder wie die Dinger auch alle heißen mögen.

                              Ob Active repo(s): beta das richtige Repo für dich ist wage ich auch zu bezweifeln.

                              0 1 Reply Last reply Reply Quote 2
                              • 0
                                00000x @Thomas Braun last edited by

                                Bin nun auf 18 und 9.

                                Nodejs-Installation:    /usr/bin/nodejs         v18.17.0
                                                        /home/pi/.nvm/versions/node/v14.17.3/bin/node           v14.17.3
                                                        /usr/local/bin/npm              9.6.7
                                                        /usr/local/bin/npx              9.6.7
                                
                                

                                Immer noch gleich der Fehler:

                                
                                2023-08-08 18:58:45.363  - info: host.raspberrypi instance system.adapter.admin.0 started with pid 1380
                                2023-08-08 18:58:48.988  - error: host.raspberrypi Caught by controller[0]: node:internal/modules/cjs/loader:1080
                                2023-08-08 18:58:48.989  - error: host.raspberrypi Caught by controller[0]:   throw err;
                                2023-08-08 18:58:48.990  - error: host.raspberrypi Caught by controller[0]:   ^
                                2023-08-08 18:58:48.990  - error: host.raspberrypi Caught by controller[0]: Error: Cannot find module '@iobroker/types'
                                2023-08-08 18:58:48.991  - error: host.raspberrypi Caught by controller[0]: Require stack:
                                2023-08-08 18:58:48.991  - error: host.raspberrypi Caught by controller[0]: - /opt/iobroker/node_modules/iobroker.admin/node_modules/@iobroker/adapter-core/build/index.js
                                2023-08-08 18:58:48.991  - error: host.raspberrypi Caught by controller[0]: - /opt/iobroker/node_modules/iobroker.admin/main.js
                                2023-08-08 18:58:48.992  - error: host.raspberrypi Caught by controller[0]:     at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15)
                                2023-08-08 18:58:48.992  - error: host.raspberrypi Caught by controller[0]:     at Module._load (node:internal/modules/cjs/loader:922:27)
                                2023-08-08 18:58:48.992  - error: host.raspberrypi Caught by controller[0]:     at Module.require (node:internal/modules/cjs/loader:1143:19)
                                2023-08-08 18:58:48.993  - error: host.raspberrypi Caught by controller[0]:     at require (node:internal/modules/cjs/helpers:110:18)
                                2023-08-08 18:58:48.993  - error: host.raspberrypi Caught by controller[0]:     at Object.<anonymous> (/opt/iobroker/node_modules/iobroker.admin/node_modules/@iobroker/adapter-core/build/index.js:21:1)
                                2023-08-08 18:58:48.993  - error: host.raspberrypi Caught by controller[0]:     at Module._compile (node:internal/modules/cjs/loader:1256:14)
                                2023-08-08 18:58:48.994  - error: host.raspberrypi Caught by controller[0]:     at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
                                2023-08-08 18:58:48.994  - error: host.raspberrypi Caught by controller[0]:     at Module.load (node:internal/modules/cjs/loader:1119:32)
                                2023-08-08 18:58:48.994  - error: host.raspberrypi Caught by controller[0]:     at Module._load (node:internal/modules/cjs/loader:960:12)
                                2023-08-08 18:58:48.994  - error: host.raspberrypi Caught by controller[0]:     at Module.require (node:internal/modules/cjs/loader:1143:19) {
                                2023-08-08 18:58:48.995  - error: host.raspberrypi Caught by controller[0]:   code: 'MODULE_NOT_FOUND',
                                2023-08-08 18:58:48.995  - error: host.raspberrypi Caught by controller[0]:   requireStack: [
                                2023-08-08 18:58:48.995  - error: host.raspberrypi Caught by controller[0]:     '/opt/iobroker/node_modules/iobroker.admin/node_modules/@iobroker/adapter-core/build/index.js',
                                2023-08-08 18:58:48.995  - error: host.raspberrypi Caught by controller[0]:     '/opt/iobroker/node_modules/iobroker.admin/main.js'
                                2023-08-08 18:58:48.996  - error: host.raspberrypi Caught by controller[0]:   ]
                                2023-08-08 18:58:48.996  - error: host.raspberrypi Caught by controller[0]: }
                                2023-08-08 18:58:48.996  - error: host.raspberrypi Caught by controller[0]: Node.js v18.17.0
                                2023-08-08 18:58:48.997  - error: host.raspberrypi instance system.adapter.admin.0 terminated with code 1 (JS_CONTROLLER_STOPPED)
                                
                                Thomas Braun mcm1957 2 Replies Last reply Reply Quote 0
                                • Thomas Braun
                                  Thomas Braun Most Active @00000x last edited by

                                  @00000x sagte in Cannot find module '@iobroker/types':

                                  Bin nun auf 18 und 9.

                                  Nein.
                                  Lies bitte die Aufräum-Anleitung aus meiner Signatur.

                                  1 Reply Last reply Reply Quote 0
                                  • mcm1957
                                    mcm1957 @00000x last edited by

                                    @00000x
                                    Hast du den Adapter NACH dem npm Upgrade neu installiert ?

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

                                      @mcm57

                                      Du meinst NACH dem Aufräumen und Geraderücken?

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

                                        @thomas-braun
                                        Ja
                                        Nachdem node u npm sauber installiert sind.
                                        Ohne einexsaubere Basis macht eine Analyse null Sinn.

                                        T 1 Reply Last reply Reply Quote 0
                                        • T
                                          tigiba @mcm1957 last edited by tigiba

                                          hab das selbe problem bei meiner ziemlich alten iobroker installation nach einem upgrade von web, admin & socket adapter die ich wohl lieber auslassen hätte sollen...

                                          hab nun wie mcm57 auch auf node 18 upgegradet, aber das hat genau wie bei diesem bei mir auch nicht's gebracht.

                                          Gibt's tipps wie man das wieder hinbekommen könnte?

                                          UPDATE: hab gerade entdeckt dass ich auf dem system noch eine veraltete npm version unter /usr/local/ hatte. hab die deaktiviert damit die neue via apt vom nodereleases repository installierte greift, und probier jetzt nochmal die fix procedure durch..

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

                                            @tigiba sagte in Cannot find module '@iobroker/types':

                                            hab die deaktiviert

                                            Was meinst du damit? Die muss gelöscht werden.
                                            Bist du sicher, dass deine Umgebung jetzt sauber ist?

                                            Kannst du ja mal per

                                            iob diag
                                            

                                            oder
                                            per node-fix-Skript (siehe meine Signatur) prüfen.

                                            mcm1957 T 2 Replies 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

                                            395
                                            Online

                                            31.8k
                                            Users

                                            80.0k
                                            Topics

                                            1.3m
                                            Posts

                                            6
                                            27
                                            2466
                                            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