sdetweil / MMM-SleepWake

module that uses an external source for motion detection, like a web camera
19 stars 0 forks source link

magic mirror not starting when i add this module config #6

Closed arora1mayank closed 3 years ago

arora1mayank commented 3 years ago

my magic mirror is not starting just because of this module config when i add in my config.js

please help me resolve that

sdetweil commented 3 years ago

post the module config. did u copy the example and set the mode?

arora1mayank commented 3 years ago

{ module: 'MMM-SleepWake', config:{ delay: 2, // default } },

see

arora1mayank commented 3 years ago

See i just changes number of minutes to 2 and default mode is 'HIDE' so i didnt set that

sdetweil commented 3 years ago

ok, what is the error

arora1mayank commented 3 years ago

pi@raspberrypi:~/MagicMirror $ npm start

magicmirror@2.15.0 start DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js

[17.06.2021 00:56.54.943] [LOG] Starting MagicMirror: v2.15.0 [17.06.2021 00:56.54.955] [LOG] Loading config ... [17.06.2021 00:56.54.982] [LOG] Loading module helpers ... [17.06.2021 00:56.54.986] [LOG] No helper found for module: alert. [17.06.2021 00:56.54.988] [LOG] No helper found for module: helloworld. [17.06.2021 00:56.54.990] [LOG] No helper found for module: clock. [17.06.2021 00:56.54.992] [LOG] No helper found for module: compliments. [17.06.2021 00:56.55.000] [ERROR] WARNING! Could not load config file. Starting with default configuration. Error found: TypeError: Module is not a constructor [17.06.2021 00:56.55.003] [LOG] Loading module helpers ... [17.06.2021 00:56.55.006] [LOG] No helper found for module: alert. [17.06.2021 00:56.55.008] [LOG] No helper found for module: helloworld. [17.06.2021 00:56.55.011] [LOG] No helper found for module: clock. [17.06.2021 00:56.55.013] [LOG] No helper found for module: compliments. [17.06.2021 00:56.55.018] [ERROR] App threw an error during load [17.06.2021 00:56.55.020] [ERROR] TypeError: Module is not a constructor at loadModule (/home/pi/MagicMirror/js/app.js:127:12) at loadNextModule (/home/pi/MagicMirror/js/app.js:164:5) at /home/pi/MagicMirror/js/app.js:166:6 at loadModule (/home/pi/MagicMirror/js/app.js:145:4) at loadNextModule (/home/pi/MagicMirror/js/app.js:164:5) at /home/pi/MagicMirror/js/app.js:166:6 at loadModule (/home/pi/MagicMirror/js/app.js:145:4) at loadNextModule (/home/pi/MagicMirror/js/app.js:164:5) at /home/pi/MagicMirror/js/app.js:166:6 at loadModule (/home/pi/MagicMirror/js/app.js:145:4) [17.06.2021 00:56.55.024] [ERROR] Whoops! There was an uncaught exception... [17.06.2021 00:56.55.034] [ERROR] TypeError: Module is not a constructor at loadModule (/home/pi/MagicMirror/js/app.js:127:12) at loadNextModule (/home/pi/MagicMirror/js/app.js:164:5) at /home/pi/MagicMirror/js/app.js:166:6 at loadModule (/home/pi/MagicMirror/js/app.js:145:4) at loadNextModule (/home/pi/MagicMirror/js/app.js:164:5) at /home/pi/MagicMirror/js/app.js:166:6 at loadModule (/home/pi/MagicMirror/js/app.js:145:4) at loadNextModule (/home/pi/MagicMirror/js/app.js:164:5) at /home/pi/MagicMirror/js/app.js:166:6 at loadModule (/home/pi/MagicMirror/js/app.js:145:4) [17.06.2021 00:56.55.039] [ERROR] MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection? [17.06.2021 00:56.55.041] [ERROR] If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues [17.06.2021 00:57.00.175] [LOG] Launching application. [17.06.2021 00:57.12.217] [LOG] Shutting down server...

arora1mayank commented 3 years ago

see this comes and Magic mirror do launches but just a black screen comes

when i remove your module config it launches correctly as it should

sdetweil commented 3 years ago

this is some other problem unrelated to my module.

can u post the complete config.js as an attachment.. have to rename to .txt

sdetweil commented 3 years ago

also for clarity. you did not change any of my modules files, correct?

arora1mayank commented 3 years ago

config.txt

arora1mayank commented 3 years ago

most probably i didnt did

arora1mayank commented 3 years ago

i just did npm install and while doing it in your module my raspberry pi turned off because of electricity cut

sdetweil commented 3 years ago

so, I would do another npm install

arora1mayank commented 3 years ago

yes i did npm install again fully

arora1mayank commented 3 years ago

is my config alright??

sdetweil commented 3 years ago

looks ok.

I would delete my module folder git clone again and npm install again

arora1mayank commented 3 years ago

Okay lemme try that too

arora1mayank commented 3 years ago

Yes it worked camera detection is now working successful thanks for the module @sdetweil

But i will surely try to improve your readme.md file and tell simple and straight steps to set up motion project and get your module working easily for others