Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Visualisierung
    4. [FRAGE] Nach Nodejs update 4>6 Javascript-Adapter läuft nicht mehr

    NEWS

    • Neues Video "KI im Smart Home" - ioBroker plus n8n

    • Neues Video über Aliase, virtuelle Geräte und Kategorien

    • Wir empfehlen: Node.js 22.x

    [FRAGE] Nach Nodejs update 4>6 Javascript-Adapter läuft nicht mehr

    This topic has been deleted. Only users with topic management privileges can see it.
    • P
      pix last edited by

      Hallo,

      habe heute nach Tagen mal wieder in mein Log gesehen und war ganz erstaunt, wieviele Fehlermeldungen es gab.

      Der Übertäter sind die beiden Telegram-Instanzen.

      ! Fehlermeldungen:````
      2017-12-11 15:44:40.174 - [32minfo[39m: host.MacMini.local instance system.adapter.telegram.0 started with pid 73350
      2017-12-11 15:44:40.764 - [31merror[39m: telegram.0 uncaught exception: Cannot find module 'request-promise'
      2017-12-11 15:44:40.769 - [31merror[39m: telegram.0 Error: Cannot find module 'request-promise'
      at Function.Module._resolveFilename (module.js:325:15)
      at Function.Module._load (module.js:276:25)
      at Module.require (module.js:353:17)
      at require (internal/module.js:12:17)
      at Object. <anonymous>(/Users/pix/Documents/iobroker/node_modules/node-telegram-bot-api/lib/telegram.js:25:15)
      at Module._compile (module.js:409:26)
      at Object.Module._extensions..js (module.js:416:10)
      at Module.load (module.js:343:32)
      at Function.Module._load (module.js:300:12)
      at Module.require (module.js:353:17)
      at require (internal/module.js:12:17)
      at Object. <anonymous>(/Users/pix/Documents/iobroker/node_modules/node-telegram-bot-api/index.js:10:20)
      at Module._compile (module.js:409:26)
      at Object.Module._extensions..js (module.js:416:10)
      at Module.load (module.js:343:32)
      at Function.Module._load (module.js:300:12)
      2017-12-11 15:44:40.833 - [32minfo[39m: telegram.0 States connected to redis: 127.0.0.1:6379
      2017-12-11 15:44:40.875 - [32minfo[39m: telegram.0 starting. Version 1.0.9 in /Users/pix/Documents/iobroker/node_modules/iobroker.telegram, node: v4.8.4
      2017-12-11 15:44:41.273 - [32minfo[39m: telegram.0 terminating
      2017-12-11 15:44:41.386 - [31merror[39m: Caught by controller[0]: Mon, 11 Dec 2017 14:44:40 GMT node-telegram-bot-api deprecated Node.js v5.x and below will no longer be supported in the future at module.js:409:26
      2017-12-11 15:44:41.386 - [31merror[39m: Caught by controller[1]: { [Error: Cannot find module 'request-promise'] code: 'MODULE_NOT_FOUND' }
      2017-12-11 15:44:41.386 - [31merror[39m: Caught by controller[2]: 2017-12-11 15:44:40.768 - telegram.0 uncaught exception: Cannot find module 'request-promise'
      2017-12-11 15:44:41.386 - [31merror[39m: Caught by controller[3]: 2017-12-11 15:44:40.769 - telegram.0 Error: Cannot find module 'request-promise'
      2017-12-11 15:44:41.387 - [31merror[39m: Caught by controller[3]: at Function.Module._resolveFilename (module.js:325:15)
      2017-12-11 15:44:41.387 - [31merror[39m: Caught by controller[3]: at Function.Module._load (module.js:276:25)
      2017-12-11 15:44:41.387 - [31merror[39m: Caught by controller[3]: at Module.require (module.js:353:17)
      2017-12-11 15:44:41.387 - [31merror[39m: Caught by controller[3]: at require (internal/module.js:12:17)
      2017-12-11 15:44:41.387 - [31merror[39m: Caught by controller[3]: at Object. <anonymous>(/Users/pix/Documents/iobroker/node_modules/node-telegram-bot-api/lib/telegram.js:25:15)
      2017-12-11 15:44:41.387 - [31merror[39m: Caught by controller[3]: at Module._compile (module.js:409:26)
      2017-12-11 15:44:41.387 - [31merror[39m: Caught by controller[3]: at Object.Module._extensions..js (module.js:416:10)
      2017-12-11 15:44:41.387 - [31merror[39m: Caught by controller[3]: at Module.load (module.js:343:32)
      2017-12-11 15:44:41.387 - [31merror[39m: Caught by controller[3]: at Function.Module._load (module.js:300:12)
      2017-12-11 15:44:41.387 - [31merror[39m: Caught by controller[3]: at Module.require (module.js:353:17)
      2017-12-11 15:44:41.387 - [31merror[39m: Caught by controller[3]: at require (internal/module.js:12:17)
      2017-12-11 15:44:41.388 - [31merror[39m: Caught by controller[3]: at Object. <anonymous>(/Users/pix/Documents/iobroker/node_modules/node-telegram-bot-api/index.js:10:20)
      2017-12-11 15:44:41.388 - [31merror[39m: Caught by controller[3]: at Module._compile (module.js:409:26)
      2017-12-11 15:44:41.388 - [31merror[39m: Caught by controller[3]: at Object.Module._extensions..js (module.js:416:10)
      2017-12-11 15:44:41.388 - [31merror[39m: Caught by controller[3]: at Module.load (module.js:343:32)
      2017-12-11 15:44:41.388 - [31merror[39m: Caught by controller[3]: at Function.Module._load (module.js:300:12)
      2017-12-11 15:44:41.388 - [31merror[39m: host.MacMini.local instance system.adapter.telegram.0 terminated with code 0 (OK)
      2017-12-11 15:44:41.388 - [32minfo[39m: host.MacMini.local Restart adapter system.adapter.telegram.0 because enabled</anonymous></anonymous></anonymous></anonymous>

      entscheidend ist diese Zeile:````
      node-telegram-bot-api deprecated Node.js v5.x and below will no longer be supported in the future at module.js:409:26
      

      Infos zum Nodejs-Update gibt es hier: http://forum.iobroker.net/viewtopic.php … 3&start=40

      Jetzt wird es wohl wirklich mal Zeit von 4 auf 6 zu gehen :roll:

      Gruß

      Pix

      1 Reply Last reply Reply Quote 0
      • P
        pix last edited by

        Update von nodejs erledigt (auf 6), leider keine Besserung 😢

        1 Reply Last reply Reply Quote 0
        • Dutchman
          Dutchman Developer Most Active Administrators last edited by

          Welche Befehle hast du alle ausgeführt zum Upgrade? System auch Mal neu gestartet?

          Nach node update muss mn oft auch Adapter nochmals installieren (und damit Compilen) zB mit reinstall.sh

          –-----------------------

          Send from mobile device

          1 Reply Last reply Reply Quote 0
          • P
            pix last edited by

            Hallo, danke für den Hinweis.

            Auf OS X Sierra:

            Ich habe mitbrew uninstall --force node@4die alte Version gelöscht, dann mitbrew search nodenachgesehen, ob alle sweg ist und dann mitbrew install node@6die neue Version installiert. Abschließen das terminal beendet und erneut geöffnet. Dann mit````
            node -v

            
            Allerdings zeigte mir````
            echo $PATH
            ````noch die alte Version mit an````
            /usr/local/opt/node@4/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/opt/node@6/bin/
            

            Dazu musste ich den Pfad ändern (ich nutze nano-editor nicht __vi__m):

            nano ~/.bash_profile
            

            dort die Zeile

            export PATH="/usr/local/opt/node@4/bin:$PATH"
            ````ersetzt durch````
            export PATH="/usr/local/opt/node@6/bin:$PATH"
            ````und speichern mit CTRL-O Enter CTRL-X
            
            Dann noch die Änderungen hochladen:
            

            source ~/.bash_profile

            Und nun zeigt echo $PATH zuerst node@6
            
            Dann wollte ich mit ./reinstall.sh die Adapter erneuern, aber der Befehl spruckte einen Fehler aus:
            

            ./reinstall.sh: /bin/bash^M: bad interpreter: No such file or directory

            [http://preview.iobroker.com/forum/viewtopic.php?f=23&amp;p=88128#p88649](http://preview.iobroker.com/forum/viewtopic.php?f=23&amp;p=88128#p88649): DOS-Format in Mac-Format/UNIX umändern, dann gings (nano resinstall.sh und dann beim Schreiben mit CTRL-X auf M-M klicken).
            
            Danach läuft erstmal recht lange ein Balken und zeigt die Installation an (für jeden Adapter, waren so 30min).
            
            Danach ioBroker Neustart
            
            ****Ergebnis: telegram läuft wieder !****
            
            Dafür javascript nicht mehr :x :x :x
            

            Cannot download adapter "javascript". To restart it disable/enable it or restart host.

            
            Blöd, weil ich jetzt erst mal weg muss….
            
            Pix
            1 Reply Last reply Reply Quote 0
            • P
              pix last edited by

              So, wieder da.

              Sehr seltsam. Bei der Installation des Adapters erhalte ich diese Meldung:

              MacMini-Ethernet:iobroker pix$ ./iobroker install javascript
              npm install iobroker.javascript --production --prefix "/Users/pix/Documents/iobroker" (System call)
              npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but npm-shrinkwrap.json was generated for lockfileVersion@0\. I'll try to do my best with it!
              npm WARN checkPermissions Missing write access to /Users/pix/Documents/iobroker/node_modules/iobroker.javascript
              npm WARN request-promise@4.2.2 requires a peer of request@^2.34 but none is installed. You must install peer dependencies yourself.
              npm WARN request-promise-core@1.1.1 requires a peer of request@^2.34 but none is installed. You must install peer dependencies yourself.
              
              npm ERR! path /Users/pix/Documents/iobroker/node_modules/iobroker.javascript
              npm ERR! code ELOOP
              npm ERR! errno -62
              npm ERR! syscall access
              npm ERR! ELOOP: too many symbolic links encountered, access '/Users/pix/Documents/iobroker/node_modules/iobroker.javascript'
              
              npm ERR! A complete log of this run can be found in:
              npm ERR!     /Users/pix/.npm/_logs/2017-12-11T22_00_36_909Z-debug.log
              host.MacMini.local Cannot install iobroker.javascript: 194
              

              Kennt sich jemand aus?

              Pix

              1 Reply Last reply Reply Quote 0
              • Dutchman
                Dutchman Developer Most Active Administrators last edited by

                Mir fällt die Meldung "Missing write" auf hat das Verzeichnis die richtigen Zugriffsrechte?

                Den Fehler mit Symbolik links und Peer dependencys sollte mit

                 npm install --save
                

                Zu beheben sein

                Welche node Version läuft jetzt bei dir?

                –-----------------------

                Send from mobile device

                1 Reply Last reply Reply Quote 0
                • P
                  pix last edited by

                  Ok, ich habe es vermutlich im Griff, muss erstmal die Nacht abwarten.

                  Dutchman, vielen Dank für deine Hilfe. Deine Tipps haben mich auf den richtigen Weg gebracht. Ich hatte tatsächlich keine Schreibrechte auf den Ordner '/Users/pix/Documents/iobroker/node_modules/iobroker.javascript', da sich eine Alias-Datei gleichen Namens dort befand. Diese habe ich gelöscht und mit````
                  npm install iobroker-.javascript --safe

                  
                  Danach war alles wieder okay.
                  
                  Vermutlich muss ich jetzt noch ein wenig die History - Daten reparieren und hier und da einen State wieder umstellen, aber es sollte gemacht sein. Ein nicht ganz willkommener, aber längst überfälliger ****Stresstest****! So bleibt man im Thema. :lol:
                  
                  An dieser Stelle sage ich ganz herzlichen Dank an ****soef**** für die Entwicklung des [https://github.com/soef/iobroker.js2fs/blob/master/README.md](https://github.com/soef/iobroker.js2fs/blob/master/README.md). Auch wenn der letztlich nicht zum Einsatz kam, um evtl. verlorene Javascripte wiederherzustellen (das iobroker-data-Verzeichnis war ja noch intakt), habe ich mir nur wegen des js2fs-Adapters die Löschung des javascript-Adapters erst zugetraut.
                  
                  Hoffe, bis morgen ist alles wieder gut.
                  
                  Gruß
                  
                  Pix
                  1 Reply Last reply Reply Quote 0
                  • Dutchman
                    Dutchman Developer Most Active Administrators last edited by

                    @pix:

                    Dutchman, vielen Dank für deine Hilfe. Deine Tipps haben mich auf den richtigen Weg gebracht. `

                    Freut mich dass ich helfen konnte, Na Dann Daumen drücken dass jetzt alles ok ist, gut nächtle

                    –-----------------------

                    Send from mobile device

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

                    Support us

                    ioBroker
                    Community Adapters
                    Donate

                    896
                    Online

                    32.1k
                    Users

                    80.6k
                    Topics

                    1.3m
                    Posts

                    2
                    8
                    1108
                    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