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.

    MMM-CalendarExt3

    Scheduled Pinned Locked Moved Utilities
    688 Posts 82 Posters 2.8m Views 86 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.
    • S Do not disturb
      sdetweil @bicolorbore586
      last edited by sdetweil

      @bicolorbore586 can you do

      cd ~/MagicMirror
      npm run config:check
      

      does it produce the same error?
      also do

      node -c config/config.js
      

      if it returns and displays nothing, then node did not detect any syntax errors.

      edit: I can reproduce this

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      1 Reply Last reply Reply Quote 0
      • S Do not disturb
        sdetweil @bicolorbore586
        last edited by sdetweil

        @bicolorbore586 add this to the top of config.js, very first line

        var document;

        I’ll open a bug report
        I opened https://github.com/MagicMirrorOrg/MagicMirror/issues/3990

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        B 1 Reply Last reply Reply Quote 0
        • B Online
          bicolorbore586 @sdetweil
          last edited by

          @sdetweil config:check returns the same error
          The node one doesn’t produce anything

          Adding var document; to the config.js gives parsing error unexpected keyword ‘var’

          S 1 Reply Last reply Reply Quote 0
          • S Do not disturb
            sdetweil @bicolorbore586
            last edited by

            @bicolorbore586 very first line
            Right?

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            B 1 Reply Last reply Reply Quote 0
            • B Online
              bicolorbore586 @sdetweil
              last edited by

              @sdetweil it wasn’t. Does it need to be before let config = { or the fist line after that?

              S 1 Reply Last reply Reply Quote 0
              • S Do not disturb
                sdetweil @bicolorbore586
                last edited by sdetweil

                @bicolorbore586 very first line of the file, all by itself
                Before any comments

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                B 1 Reply Last reply Reply Quote 0
                • B Online
                  bicolorbore586 @sdetweil
                  last edited by

                  @sdetweil that appears to have worked. Out of interest. What does that do?

                  S 1 Reply Last reply Reply Quote 0
                  • S Do not disturb
                    sdetweil @bicolorbore586
                    last edited by sdetweil

                    @bicolorbore586 the module code you have used the global variable document to examine the web page contents

                    The syntax checker found the use, but didn’t know that this code (config.js is a JavaScript file) was loaded in a browser
                    So it reported use of an undeclared variable

                    The fix was to declare the variable as a global so the checker will be happy

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    1 Reply Last reply Reply Quote 1
                    • 1
                    • 2
                    • 65
                    • 66
                    • 67
                    • 68
                    • 69
                    • 69 / 69
                    • 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