Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Entwicklung
    4. Adapter wird 2x installiert

    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

    Adapter wird 2x installiert

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

      @OliverIO bei dem replace fehler meckert er die zeile an

      printerpath = 'IP_' + repetierIP.replace(/./g, '_') + '.' ;

      ich vermute, das die variable null ist oder kein string.
      dann gibt es replace natürlich nicht

      apollon77 Baumert 2 Replies Last reply Reply Quote 0
      • apollon77
        apollon77 @OliverIO last edited by

        @OliverIO sowas musst du vorher prüfen. Beim programmieren niemals davon ausgehen das werte schon so sind wie du sie erwartete wenn du sie nicht selbst genau so gesetzt hast. Vor allem wenn die vom User eingegeben sein könnte oder so.

        1 Reply Last reply Reply Quote 0
        • Baumert
          Baumert @OliverIO last edited by Baumert

          @OliverIO Ich habe die Variablen so angelegt:

          // Hauptpfade
          let printerpath ;
          let serverpath ;

          Ich werde es jetzt mal so anlegen:

          // Hauptpfade
          let printerpath = ' ' ;
          let serverpath = ' ' ;

          OliverIO 2 Replies Last reply Reply Quote 0
          • OliverIO
            OliverIO @Baumert last edited by

            @Baumert

            Ich weiß nicht wie deine Entwicklungsumgebung eingerichtet ist,
            aber lese dir das mal durch

            https://forum.iobroker.net/topic/22208/lösung-für-den-fehler-eisgit

            und meinen Beitrag hier

            https://forum.iobroker.net/topic/4201/adapter-debuggen-mit-chrome/2

            1 Reply Last reply Reply Quote 0
            • OliverIO
              OliverIO @Baumert last edited by

              @Baumert du musst dran denken, das auf travis und auch beim benutzer der adapter zum ersten mal läuft und der benutzer noch nie eine konfiguration eingegeben hat.
              der adapter schmiert ab, weil die variablen mit der konfig nicht gesetzt sind.
              das musst du im programmcode entweder abfangen oder sinnvolle vorgaben in io-package.json machen.

              bei mir ab zeile 125 habe ich soetwas gemacht
              https://github.com/oweitman/ioBroker.squeezeboxrpc/blob/96e74d62f9d76586965052edcbc66645acf801ca/io-package.json#L125
              das sind Standardvorgaben, die der Benutzer dann im Konfigdialog abändern kann.

              1 Reply Last reply Reply Quote 0
              • OliverIO
                OliverIO @Baumert last edited by

                @Baumert hm du initialisierst zwar. aber weiter unten werden diese variablen dann mit der nicht vorhandenen konfiguration überschrieben, die wahrscheinlich (undefined) ist.

                Baumert apollon77 2 Replies Last reply Reply Quote 0
                • Baumert
                  Baumert @OliverIO last edited by

                  @OliverIO vielen Dank, jetzt habe ich erst mal einen Anhaltspunkt. Ich werde dies jetzt abfangen und erneut testen...

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

                    @OliverIO was steht denn in der up-Package vom Adapter in native? Aber ja. Immer prüfen

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

                      @apollon77 es geht hier um den adapter von @Baumert
                      aber da stand vorhin unter native nix drin

                      Baumert 1 Reply Last reply Reply Quote 0
                      • Baumert
                        Baumert @OliverIO last edited by Baumert

                        @OliverIO ja, "repIP" habe ich jetzt nachgetragen - vorher war nur "repPort" bei Native drin, da ich dort den Port 3344 bereits vorgebe.

                        OliverIO 1 Reply Last reply Reply Quote 0
                        • OliverIO
                          OliverIO @Baumert last edited by

                          @Baumert und was ist mit repetierApi

                          allen konfigs initialisieren

                          Baumert 1 Reply Last reply Reply Quote 0
                          • Baumert
                            Baumert @OliverIO last edited by

                            @OliverIO erledigt...

                            OliverIO 1 Reply Last reply Reply Quote 0
                            • OliverIO
                              OliverIO @Baumert last edited by

                              @Baumert #44 sieht schon mal besser aus

                              Baumert 1 Reply Last reply Reply Quote 0
                              • Baumert
                                Baumert @OliverIO last edited by

                                @OliverIO wird langsam...

                                Baumert 1 Reply Last reply Reply Quote 0
                                • Baumert
                                  Baumert @Baumert last edited by Baumert

                                  @Baumert so...

                                  6Travis CI.png

                                  allerdings noch ohne Script "- npm run test:unit", hier gibt es noch Errors. Dies und das doppelte Installieren des Adapters (siehe Post 1) gehe ich morgen an.

                                  Vielen Dank für Eure Tipps und Unterstützung.

                                  OliverIO AlCalzone 2 Replies Last reply Reply Quote 0
                                  • OliverIO
                                    OliverIO @Baumert last edited by

                                    @Baumert 👍

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

                                      @Baumert sagte in Adapter wird 2x installiert:

                                      allerdings noch ohne Script "- npm run test:unit", hier gibt es noch Errors.

                                      Dann lass das raus. Der Integration Test ist wichtiger.

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

                                        @AlCalzone
                                        sollte er nicht, da sein Adapter noch nicht kompatibel mit dem compact mode ist.
                                        da muss er noch reparieren

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

                                          @OliverIO Hast Recht, ich habs gerade gesehen:

                                          Error: The unload callback was not called within the timeout
                                          Error: The adapter's main file must export a function in compact mode!
                                          

                                          Beides valide Fehler, die es zu beheben gilt.

                                          @Baumert Was hast du eigentlich für eine Vorlage verwendet? Einige deiner Probleme hier sollten mit einer aktuellen Vorlage bzw. dem Adapter-Creator gar nicht erst auftreten.

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

                                            Und weil wir schon bei Quasi Reviews hier sind ... bitte schau Dir auch mal https://github.com/ioBroker/ioBroker.repositories#development-and-coding-best-practices an ... und überlege was dich betreffen kann ...

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            875
                                            Online

                                            31.8k
                                            Users

                                            80.0k
                                            Topics

                                            1.3m
                                            Posts

                                            gelb installation instanz nodemodules
                                            4
                                            55
                                            2304
                                            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