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.

    Testing my module, it is stuck loading

    Scheduled Pinned Locked Moved Solved Troubleshooting
    31 Posts 2 Posters 8.5k Views 2 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 Offline
      sdetweil @l0zarus
      last edited by

      @l0zarus AH, now we’re getting somewhere

      go to the console tab and put part of your module name in the filter field

      also,

      modulename in config.js = folder name in modules folder = filename of the .js file
      AND the register name

      config.js 
           module:"SampleModule", 
      modules/SampleModule/SampleModule.js
      Module.register("SampleModule", {
      

      ALL these MUST match else your module is not loaded
      system is case sensitive

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      L 2 Replies Last reply Reply Quote 0
      • L Offline
        l0zarus @sdetweil
        last edited by l0zarus

        @sdetweil Alright I have a few errors showing, and I’m having an issue moving my file to the modules folder. I have verified the name is the same across the folder, the js file, and the config file.

        First, I got the following message when trying to move it:

        mv MMM-ConcertsAroundMe /modules
        mv: cannot move 'MMM-ConcertsAroundMe' to '/modules': Permission denied
        

        Will paste the console errors as well, I am moving between my mac and raspberry pi

        S 2 Replies Last reply Reply Quote 0
        • S Offline
          sdetweil @l0zarus
          last edited by

          @l0zarus its not /modules (that is in the root)

          depending where your module is , the quick way

          mv MMM-ConcertsAroundMe ~/MagicMirror/modules
          

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          L 1 Reply Last reply Reply Quote 0
          • L Offline
            l0zarus @sdetweil
            last edited by

            @sdetweil aha! I had tried that as well, but I did not include the ~. I am learning so much from this project :)

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

              @l0zarus said in Testing my module, it is stuck loading:

              I am moving between my mac and raspberry pi

              magicmirror will run on your mac…

              use my install script

              Sam

              How to add modules

              learning how to use browser developers window for css changes

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

                @l0zarus ~ means users home folder (less letters to type, remember most of this linux console stuff was created on slow 300bps phone lines… the fewer letters the better)

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                1 Reply Last reply Reply Quote 0
                • L Offline
                  l0zarus @sdetweil
                  last edited by

                  @sdetweil alright here are the errors:

                  Screenshot 2023-05-07 at 8.25.35 PM.png

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

                    @l0zarus did yiu npm install luxon in your module folder

                    npm init -y 
                    npm install luxon 
                    

                    if u don’t do the npm init in your module folder the module will be installed in the root MM node_modules, then not found here

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    L 1 Reply Last reply Reply Quote 0
                    • L Offline
                      l0zarus @sdetweil
                      last edited by

                      @sdetweil ok that was an issue! I got luxon installed in the right place. Now I’m getting the following errors:
                      Screenshot 2023-05-07 at 8.41.45 PM.png

                      I tested the exact link from the first error “Access to fetch at…” in postman and I get a clean response

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

                        @l0zarus lovely CORS… welcome to the fun

                        postman didn’t use localhost it used the local IP address

                        you ‘might’ get to fix it in config.js ? maybe

                        from terminal window do

                        ip addr

                        that give u the local machine ip address
                        use that in the config.js

                        address:""
                        

                        instead of locahost…

                        CORS basically means, “hey, you are not in our known approved access network, get lost”

                        Sam

                        How to add modules

                        learning how to use browser developers window for css changes

                        L 1 Reply Last reply Reply Quote 0
                        • 1
                        • 2
                        • 3
                        • 4
                        • 2 / 4
                        • 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