MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    Are you tired of editing config.js, or have trouble doing it, see my new module

    Scheduled Pinned Locked Moved Utilities
    293 Posts 28 Posters 341.7k Views 31 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M Offline
      MarcLandis Module Developer @sdetweil
      last edited by MarcLandis

      @sdetweil I get the same blank page and the reason is that it errors on buildschema4.js.

      1|MagicMirror² | SyntaxError: Unexpected token ‘:’, …“^^-01-01”::[“Happy n”… is not valid JSON
      1|MagicMirror² | at JSON.parse ()
      1|MagicMirror² | at Object. (/home/dirk/MagicMirror/modules/MMM-Config/scripts/buildschema4.js:1173:14)
      1|MagicMirror² | at Module._compile (node:internal/modules/cjs/loader:1546:14)
      1|MagicMirror² | at Module._extensions…js (node:internal/modules/cjs/loader:1691:10)
      1|MagicMirror² | at Module.load (node:internal/modules/cjs/loader:1317:32)
      1|MagicMirror² | at Module._load (node:internal/modules/cjs/loader:1127:12)
      1|MagicMirror² | at TracingChannel.traceSync (node:diagnostics_channel:315:14)
      1|MagicMirror² | at wrapModuleLoad (node:internal/modules/cjs/loader:217:24)
      1|MagicMirror² | at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:166:5)
      1|MagicMirror² | at node:internal/main/run_main_module:30:49

      The reason is the compliments module:

      compliments: {
      anytime: [“Hey there sexy!”],
      morning: [“Good morning, handsome!”, “Enjoy your day!”, “How was your sleep?”],
      afternoon: [“Hello, beauty!”, “You look sexy!”, “Looking good today!”],
      evening: [“Wow, you look hot!”, “You look nice!”, “Hi, sexy!”],
      “…-01-01”: [“Happy new year!”]
      },

      S 1 Reply Last reply Reply Quote 0
      • S Offline
        sdetweil @MarcLandis
        last edited by

        @MarcLandis thanks…

        in July I changed the processing for compliments… it worked before and the new process changed it to a different approach but still works…

        can you do

        in the module folder
        ls schemas -laF

        there should be 4 files related to compliments

        these two handle the correction for the possible . in the js object type

        -rw-rw-r-- 1 sam sam 2882 Jun 29 07:32 compliments_converter.js
        -rw-rw-r-- 1 sam sam 9006 Jul 6 19:14 compliments.schema.json

        and these two that improve the form look and feel and handling

        -rw-rw-r-- 1 sam sam 381 Jun 28 18:01 compliments_extension.css
        -rw-rw-r-- 1 sam sam 1980 Jul 6 19:10 compliments_extension.js

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        M 1 Reply Last reply Reply Quote 0
        • M Offline
          MarcLandis Module Developer @sdetweil
          last edited by

          @sdetweil

          -rw-r–r-- 1 dirk dirk 2882 Sep 13 15:23 compliments_converter.js
          -rw-r–r-- 1 dirk dirk 381 Sep 13 15:23 compliments_extension.css
          -rw-r–r-- 1 dirk dirk 1980 Sep 13 15:23 compliments_extension.js
          -rw-r–r-- 1 dirk dirk 9006 Sep 13 15:23 compliments.schema.json

          I just did a fresh install of the module, to test something myself

          S 1 Reply Last reply Reply Quote 0
          • S Offline
            sdetweil @MarcLandis
            last edited by sdetweil

            @MarcLandis gosh I hate git changing file dates…

            SO, can you do this for me

            in the module folder do

            node scripts/buildschema4.js …/defaults.js debug >somefile.txt 2>&1

            and send me somefile.txt

            I’d have you attach it to an issue, but it shows every line from config.js
            same id at gmail… and issue attachments are public

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            M 1 Reply Last reply Reply Quote 0
            • M Offline
              MarcLandis Module Developer @sdetweil
              last edited by

              @sdetweil I created a new issue on github and uploaded the file after removing some sensitive information.

              S 1 Reply Last reply Reply Quote 0
              • S Offline
                sdetweil @MarcLandis
                last edited by

                @MarcLandis great… thanks

                pushed fix to the with_unused_fix branch

                git pull
                git checkout with_unused_fix
                and run the buildschema4 test again

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                M 1 Reply Last reply Reply Quote 0
                • M Offline
                  MarcLandis Module Developer @sdetweil
                  last edited by

                  @sdetweil

                  throws an error:

                  /home/dirk/MagicMirror/modules/MMM-Config/scripts/buildschema4.js:750
                  if(module_scripts[m.module] !== undefined ){
                  ^

                  M S 2 Replies Last reply Reply Quote 0
                  • M Offline
                    MarcLandis Module Developer @MarcLandis
                    last edited by

                    @MarcLandis said in Are you tired of editing config.js, or have trouble doing it, see my new module:

                    @sdetweil

                    throws an error:

                    /home/dirk/MagicMirror/modules/MMM-Config/scripts/buildschema4.js:750
                    if(module_scripts[m.module] !== undefined ){
                    ^

                    @sdetweil

                    fixed it myself but ran into the next exception:

                    calling module data converter script for module=compliments
                    /home/dirk/MagicMirror/modules/MMM-Config/schemas/compliments_converter.js:24
                    		Object.keys(config_data.compliments).forEach(c =>{
                    		                        ^
                    
                    TypeError: Cannot read properties of undefined (reading 'compliments')
                        at Object.converter (/home/dirk/MagicMirror/modules/MMM-Config/schemas/compliments_converter.js:24:27)
                        at /home/dirk/MagicMirror/modules/MMM-Config/scripts/buildschema4.js:754:49
                    
                    M 1 Reply Last reply Reply Quote 0
                    • S Offline
                      sdetweil @MarcLandis
                      last edited by

                      @MarcLandis sorry, try again, git pull…

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

                      1 Reply Last reply Reply Quote 0
                      • M Offline
                        MarcLandis Module Developer @MarcLandis
                        last edited by

                        @MarcLandis said in Are you tired of editing config.js, or have trouble doing it, see my new module:

                        @MarcLandis said in Are you tired of editing config.js, or have trouble doing it, see my new module:

                        @sdetweil

                        throws an error:

                        /home/dirk/MagicMirror/modules/MMM-Config/scripts/buildschema4.js:750
                        if(module_scripts[m.module] !== undefined ){
                        ^

                        @sdetweil

                        fixed it myself but ran into the next exception:

                        calling module data converter script for module=compliments
                        /home/dirk/MagicMirror/modules/MMM-Config/schemas/compliments_converter.js:24
                        		Object.keys(config_data.compliments).forEach(c =>{
                        		                        ^
                        
                        TypeError: Cannot read properties of undefined (reading 'compliments')
                            at Object.converter (/home/dirk/MagicMirror/modules/MMM-Config/schemas/compliments_converter.js:24:27)
                            at /home/dirk/MagicMirror/modules/MMM-Config/scripts/buildschema4.js:754:49
                        

                        I f… up

                        After git pull I have an exception in one of my not published modules. Going to check that first.

                        S 2 Replies Last reply Reply Quote 0
                        • 1
                        • 2
                        • 3
                        • 4
                        • 5
                        • 29
                        • 30
                        • 1 / 30
                        • First post
                          Last post
                        Enjoying MagicMirror? Please consider a donation!
                        MagicMirror created by Michael Teeuw.
                        Forum managed by Sam, technical setup by Karsten.
                        This forum is using NodeBB as its core | Contributors
                        Contact | Privacy Policy