Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Error/Bug
    4. JS Instanz startet nicht mehr

    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

    JS Instanz startet nicht mehr

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

      Ich habe in der JS Instanz ein zusätzliches npm Modul suncalc hinzugefügt.
      Jetzt lässt sich JS nicht mehr starten.
      Das steht in der LOG Datei, ein Auszug, der sich immer wiederholt

      
      2024-03-20 15:48:36.376 - info: host.iobroker Restart adapter system.adapter.javascript.0 because enabled
      2024-03-20 15:49:06.461 - info: host.iobroker instance system.adapter.javascript.0 started with pid 2544
      2024-03-20 15:49:06.820 - error: host.iobroker Caught by controller[0]: /opt/iobroker/node_modules/iobroker.javascript/node_modules/tough-cookie/lib/cookie.js:1144
      2024-03-20 15:49:06.820 - error: host.iobroker Caught by controller[0]: // The cookie's host-only-flag is false and the cano
      2024-03-20 15:49:06.820 - error: host.iobroker Caught by controller[0]:
      2024-03-20 15:49:06.820 - error: host.iobroker Caught by controller[0]: SyntaxError: Unexpected end of input
      2024-03-20 15:49:06.820 - error: host.iobroker Caught by controller[0]: at internalCompileFunction (node:internal/vm:73:18)
      2024-03-20 15:49:06.821 - error: host.iobroker Caught by controller[0]: at wrapSafe (node:internal/modules/cjs/loader:1274:20)
      2024-03-20 15:49:06.821 - error: host.iobroker Caught by controller[0]: at Module._compile (node:internal/modules/cjs/loader:1320:27)
      2024-03-20 15:49:06.821 - error: host.iobroker Caught by controller[0]: at Module._extensions..js (node:internal/modules/cjs/loader:1414:10)
      2024-03-20 15:49:06.821 - error: host.iobroker Caught by controller[0]: at Module.load (node:internal/modules/cjs/loader:1197:32)
      2024-03-20 15:49:06.821 - error: host.iobroker Caught by controller[0]: at Module._load (node:internal/modules/cjs/loader:1013:12)
      2024-03-20 15:49:06.821 - error: host.iobroker Caught by controller[0]: at Module.require (node:internal/modules/cjs/loader:1225:19)
      2024-03-20 15:49:06.822 - error: host.iobroker Caught by controller[0]: at require (node:internal/modules/helpers:177:18)
      2024-03-20 15:49:06.822 - error: host.iobroker Caught by controller[0]: at Object. (/opt/iobroker/node_modules/iobroker.javascript/node_modules/request/lib/cookies.js:3:13)
      2024-03-20 15:49:06.822 - error: host.iobroker Caught by controller[0]: at Module._compile (node:internal/modules/cjs/loader:1356:14)
      2024-03-20 15:49:06.822 - error: host.iobroker Caught by controller[0]: at Module._extensions..js (node:internal/modules/cjs/loader:1414:10)
      2024-03-20 15:49:06.822 - error: host.iobroker Caught by controller[0]: at Module.load (node:internal/modules/cjs/loader:1197:32)
      2024-03-20 15:49:06.822 - error: host.iobroker Caught by controller[0]: at Module._load (node:internal/modules/cjs/loader:1013:12)
      2024-03-20 15:49:06.822 - error: host.iobroker Caught by controller[0]: at Module.require (node:internal/modules/cjs/loader:1225:19)
      2024-03-20 15:49:06.823 - error: host.iobroker Caught by controller[0]: at require (node:internal/modules/helpers:177:18)
      2024-03-20 15:49:06.823 - error: host.iobroker Caught by controller[0]: at Object. (/opt/iobroker/node_modules/iobroker.javascript/node_modules/request/index.js:18:15)
      2024-03-20 15:49:06.823 - error: host.iobroker Caught by controller[0]: at Module._compile (node:internal/modules/cjs/loader:1356:14)
      2024-03-20 15:49:06.823 - error: host.iobroker Caught by controller[0]: at Module._extensions..js (node:internal/modules/cjs/loader:1414:10)
      2024-03-20 15:49:06.823 - error: host.iobroker Caught by controller[0]: at Module.load (node:internal/modules/cjs/loader:1197:32)
      2024-03-20 15:49:06.823 - error: host.iobroker Caught by controller[0]: at Module._load (node:internal/modules/cjs/loader:1013:12)
      2024-03-20 15:49:06.823 - error: host.iobroker Caught by controller[0]: at Module.require (node:internal/modules/cjs/loader:1225:19)
      2024-03-20 15:49:06.823 - error: host.iobroker Caught by controller[0]: at require (node:internal/modules/helpers:177:18)
      2024-03-20 15:49:06.824 - error: host.iobroker Caught by controller[0]: at Object. (/opt/iobroker/node_modules/iobroker.javascript/lib/request.js:5:18)
      2024-03-20 15:49:06.824 - error: host.iobroker Caught by controller[0]: at Module._compile (node:internal/modules/cjs/loader:1356:14)
      2024-03-20 15:49:06.824 - error: host.iobroker Caught by controller[0]: at Module._extensions..js (node:internal/modules/cjs/loader:1414:10)
      2024-03-20 15:49:06.824 - error: host.iobroker Caught by controller[0]: at Module.load (node:internal/modules/cjs/loader:1197:32)
      2024-03-20 15:49:06.824 - error: host.iobroker Caught by controller[0]: at Module._load (node:internal/modules/cjs/loader:1013:12)
      2024-03-20 15:49:06.824 - error: host.iobroker Caught by controller[0]: at Module.require (node:internal/modules/cjs/loader:1225:19)
      2024-03-20 15:49:06.824 - error: host.iobroker Caught by controller[0]: at require (node:internal/modules/helpers:177:18)
      2024-03-20 15:49:06.824 - error: host.iobroker Caught by controller[0]: at Object. (/opt/iobroker/node_modules/iobroker.javascript/main.js:44:23)
      2024-03-20 15:49:06.825 - error: host.iobroker Caught by controller[0]: at Module._compile (node:internal/modules/cjs/loader:1356:14)
      2024-03-20 15:49:06.825 - error: host.iobroker Caught by controller[0]: at Module._extensions..js (node:internal/modules/cjs/loader:1414:10)
      2024-03-20 15:49:06.825 - error: host.iobroker Caught by controller[0]: at Module.load (node:internal/modules/cjs/loader:1197:32)
      2024-03-20 15:49:06.825 - error: host.iobroker Caught by controller[0]: at Module._load (node:internal/modules/cjs/loader:1013:12)
      2024-03-20 15:49:06.825 - error: host.iobroker Caught by controller[0]: at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:128:12)
      2024-03-20 15:49:06.825 - error: host.iobroker Caught by controller[0]: at node:internal/main/run_main_module:28:49
      2024-03-20 15:49:06.825 - error: host.iobroker Caught by controller[0]: Node.js v18.19.1
      2024-03-20 15:49:06.826 - error: host.iobroker instance system.adapter.javascript.0 terminated with code 1 (JS_CONTROLLER_STOPPED)
      2024-03-20 15:49:06.826 - info: host.iobroker Restart adapter system.adapter.javascript.0 because enabled
      
      iob stop 
      iob fix
      iob start
      

      `
      habe ich gemacht. Hilft aber nicht. Was kann ich noch machen?``

      DJMarc75 haus-automatisierung 2 Replies Last reply Reply Quote 0
      • DJMarc75
        DJMarc75 @Pistus last edited by

        @pistus sagte in JS Instanz startet nicht mehr:

        npm Modul suncalc hinzugefügt

        mach das erst mal raus und versuche danach suncalc2

        1 Reply Last reply Reply Quote 0
        • haus-automatisierung
          haus-automatisierung Developer Most Active @Pistus last edited by

          @pistus sagte in JS Instanz startet nicht mehr:

          Ich habe in der JS Instanz ein zusätzliches npm Modul suncalc hinzugefügt.

          Warum auch immer - suncalc2 ist im Standard JavaScript-Adpater ja schon als Abhängigkeit enthalten. Kann man direkt verwenden ohne es in die Liste der zusätzlichen Module einzutragen.

          Und eigentlich stellt der JavaScript-Adapter ja schon alle berechneten Datenpunkte und Funktionen bereit, sodass man damit (hoffentlich) nix mehr selbst machen muss.

          P 1 Reply Last reply Reply Quote 1
          • P
            Pistus @haus-automatisierung last edited by

            @haus-automatisierung
            @DJMarc75
            Alle Skripte, die ich im Forum zu diesem Thema gesehen haben fingen mit dieser Codezeile an

            var suncalc = require('suncalc'),
            

            Die Fehlermeldung lautete dann `'Cannnot find suncalc'
            Wie wird der Befehl in suncalc2 geschrieben?
            Zunächst hatte ich suncalc mittels Putty installiert.
            Weil der Fehler immer noch angezeigt wurde, habe ich suncalc über die Instanzeinstellungen in JS installiert. Jetzt startete JS nicht mehr.
            Dann habe ich in den Instanzeinstellungen sunkalc entfernt.

            Wie bekomme ich JS wieder funktionsfähig?

            Homoran haus-automatisierung 2 Replies Last reply Reply Quote 0
            • Homoran
              Homoran Global Moderator Administrators @Pistus last edited by

              @pistus sagte in JS Instanz startet nicht mehr:

              Zunächst hatte ich suncalc mittels Putty installiert.

              wie und wo?

              P 1 Reply Last reply Reply Quote 0
              • P
                Pistus @Homoran last edited by

                @homoran
                In ioBroker, mittels

                sudo npm -g install suncalc
                
                DJMarc75 Homoran 2 Replies Last reply Reply Quote 0
                • DJMarc75
                  DJMarc75 @Pistus last edited by

                  @pistus sagte in JS Instanz startet nicht mehr:

                  sudo npm -g install suncalc

                  ernsthaft? man fügt Module hier ein:

                  Screenshot 2024-03-20 170906.png

                  aber wie schon @haus-automatisierung geschrieben hat ist suncalc2 schon integriert

                  1 Reply Last reply Reply Quote 1
                  • Homoran
                    Homoran Global Moderator Administrators @Pistus last edited by Homoran

                    @pistus sagte in JS Instanz startet nicht mehr:

                    @homoran
                    In ioBroker, mittels

                    sudo npm -g install suncalc
                    

                    dazu sollte es dann auch einen Befehl geben das global wieder zu enfernen.

                    @pistus sagte in JS Instanz startet nicht mehr:

                    Alle Skripte, die ich im Forum zu diesem Thema gesehen haben fingen mit dieser Codezeile an

                    Wie alt waren die denn?
                    Da gab's wohl noch kein suncalc2

                    P 1 Reply Last reply Reply Quote 0
                    • P
                      Pistus @Homoran last edited by

                      @homoran
                      @DJMarc75
                      ernsthaft! Ich bin in ioBroker noch nichi so fit und muss alles was ich tue erst lesen und dann probieren. Dass hinzufügen von Modulen auch über die Instanzeinstellungen fuktioniet, habe ich später gelesen.
                      Den uninstall Befehl

                      npm uninstall /full/path/to/node_modules/module-name
                      

                      werde ich testen

                      Homoran 1 Reply Last reply Reply Quote 0
                      • Homoran
                        Homoran Global Moderator Administrators @Pistus last edited by

                        @pistus sagte in JS Instanz startet nicht mehr:

                        muss alles was ich tue erst lesen

                        das ist ja auch gut so

                        https://www.iobroker.net/#de/documentation

                        1 Reply Last reply Reply Quote 0
                        • haus-automatisierung
                          haus-automatisierung Developer Most Active @Pistus last edited by

                          @pistus Die Frage ist ja: Wozu und was hast Du vor?

                          P 1 Reply Last reply Reply Quote 0
                          • P
                            Pistus @haus-automatisierung last edited by

                            @haus-automatisierung
                            Ich habe ein Flachdach in Ost West Richtung.
                            Auf diesem Dach ist eine 10KW Solaranlage installiert, auch in Ost West Richtung ausgerichtet.

                            Jetzt wollte ich je nach Sonnenstand die Leistung in VIS2 ablesen können.
                            Die Sonne geht im Osten (dargestellt mittels kleines Bild) um 7Uhr auf und und wandert im Halbkreis Richtung Westen wo sie dann um 19Uhr unter geht. Hintergrundbild ist das Solardach. Aus dem SMA Wechselrichter steht mittels Modbus die Leistung zur Verfügung.
                            Ob das überhaupt funktioniert weiß ich noch nicht, will es aber versuchen.

                            Der uninstall Befehl hat nichts gebracht.

                            iobroker@iobroker:~ $ sudo npm uninstall /full/path/to/node_modules/suncalc
                            [sudo] password for iobroker:
                            
                            up to date, audited 2 packages in 1s
                            
                            found 0 vulnerabilities
                            npm notice
                            npm notice New minor version of npm available! 10.2.4 -> 10.5.0
                            npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.5.0
                            npm notice Run npm install -g npm@10.5.0 to update!
                            npm notice
                            iobroker@iobroker:~ $ sudo npm uninstall /full/path/to/node_modules/suncalc
                            
                            up to date, audited 2 packages in 1s
                            
                            found 0 vulnerabilities
                            
                            

                            Kann ich JS löschen und neu installieren? Oder hat noch Jemand eine Idee?

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

                              @pistus sagte in JS Instanz startet nicht mehr:

                              /full/path/to/node_modules/suncalc

                              Das muss ja auch von dir auf den vollen Pfad geändert werden.
                              Und grundsätzlich wird npm tunlichst NICHT mit sudo eingeleitet.
                              In dem Fall aber:

                              sudo npm -g uninstall suncalc
                              

                              Und allgemein lässt man die Finger von 'npm'. Das Tool ist zu 'gefährlich', wenn man nicht genau weiß was man damit wo und warum anstellt.

                              P 1 Reply Last reply Reply Quote 2
                              • P
                                Pistus @Thomas Braun last edited by

                                @thomas-braun
                                Ich habe mir mein System leider kaputt gemacht. Jetzt will das System nur noch ein ioBroker Setup durchführen.
                                Da der Raspi 4 erst 1 Monat alt ist, möchte ich noch einmal alles neu installieren. So, als hätte ich einen jungfräulichen RaspberryPi 4. Ich mache als Anfänger noch sehr viel falsch.
                                Bis auf VIS 2 habe ich noch Backup's von meinem Raspberry 3 auf einer USB Festplatte an der Fritzbox.
                                Wie kann man bei der ioBroker Installation erreichen, dass die gleiche IP Adresse wie vor eingestellt ist?

                                Codierknecht 1 Reply Last reply Reply Quote 0
                                • Codierknecht
                                  Codierknecht Developer Most Active @Pistus last edited by

                                  @pistus sagte in JS Instanz startet nicht mehr:

                                  Wie kann man bei der ioBroker Installation erreichen, dass die gleiche IP Adresse wie vor eingestellt ist?

                                  Das hat mit ioBroker nix zu tun.
                                  Üblicherweise vergibt Dein Router die IP-Adressen per DHCP. Dort kannst Du sie auch ändern.
                                  Wenn Du den Pi neu aufsetzt, sollte er (normalerweise) seine IP behalten. Die MAC-Adresse ändert sich ja nicht.

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

                                  Support us

                                  ioBroker
                                  Community Adapters
                                  Donate

                                  962
                                  Online

                                  31.8k
                                  Users

                                  80.0k
                                  Topics

                                  1.3m
                                  Posts

                                  6
                                  15
                                  439
                                  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