Read the statement by Michael Teeuw here.
Testing my module, it is stuck loading
-
@l0zarus open the develpers window , ctrl-shift-i, then select the sources tab, modules in the left nav, and find your module
click the number in the left nav for the 1st line under your getdom
and then hit f5 to refesh the page and stop at your getdom function
-
@l0zarus also, NEVER fetch inside getDom()… get the data first, THEN call updateDom() to advise there is data ready …
you can use the start function, or better, use the notifcationReceived function for “ALL_MODULES_LOADED” then kick off a timer or an interval
at the end of good data received, call this.updateDom()getdom must ALWAYS return a dom element (aka wrapper at least)
-
@sdetweil I’m not sure I’m following this. Do you mean in VS code or with the Magic Mirror application running?
-
@l0zarus magicmirror… of course
-
@sdetweil well my module isn’t even in the modules folder even though it is in the config file which is confusing to me. I noticed in your screenshot that default is a subfolder of modules. That is true in my path to the module, but they are appearing as one combined folder. I’m not sure why that is the case. In any event, clearly my module was never actually loading at all. Any idea what the issue is here? I’ll start to update my code to remove the API call from the getDom function.
-
@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 nameconfig.js module:"SampleModule", modules/SampleModule/SampleModule.js Module.register("SampleModule", {
ALL these MUST match else your module is not loaded
system is case sensitive -
@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
-
@l0zarus its not /modules (that is in the root)
depending where your module is , the quick way
mv MMM-ConcertsAroundMe ~/MagicMirror/modules
-
@sdetweil aha! I had tried that as well, but I did not include the ~. I am learning so much from this project :)
-
@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