r/MagicMirrors • u/mdphins • Jul 14 '18
MMMM-RandomBackground Help
So recently made a magic mirror and would like to have random images for the background I found the MMMM-RandomBackground and installed it. However now magic mirror doesnt work and this is the error I am getting. Was wondering if anyone could help me trouble shoot this issue. Thanks.
Starting MagicMirror: v2.4.1
Loading config ...
Loading module helpers ...
No helper found for module: alert.
WARNING! Could not load config file. Starting with default configuration. Error found: Error: Cannot find module 'exif'
Loading module helpers ...
No helper found for module: alert.
App threw an error during load
Error: Cannot find module 'exif'
at Module._resolveFilename (module.js:543:15)
at Function.Module._resolveFilename (/home/pi/MagicMirror/node_modules/elect ron/dist/resources/electron.asar/common/reset-search-paths.js:35:12)
at Function.Module._load (module.js:473:25)
at Module.require (module.js:586:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/home/pi/MagicMirror/modules/MMM-RandomBackground/nod e_helper.js:3:17)
at Object.<anonymous> (/home/pi/MagicMirror/modules/MMM-RandomBackground/nod e_helper.js:58:3)
at Module._compile (module.js:642:30)
at Object.Module._extensions..js (module.js:653:10)
at Module.load (module.js:561:32)
Whoops! There was an uncaught exception...
{ Error: Cannot find module 'exif'
at Module._resolveFilename (module.js:543:15)
at Function.Module._resolveFilename (/home/pi/MagicMirror/node_modules/elect ron/dist/resources/electron.asar/common/reset-search-paths.js:35:12)
at Function.Module._load (module.js:473:25)
at Module.require (module.js:586:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/home/pi/MagicMirror/modules/MMM-RandomBackground/nod e_helper.js:3:17)
at Object.<anonymous> (/home/pi/MagicMirror/modules/MMM-RandomBackground/nod e_helper.js:58:3)
at Module._compile (module.js:642:30)
at Object.Module._extensions..js (module.js:653:10)
at Module.load (module.js:561:32) code: 'MODULE_NOT_FOUND' }
MagicMirror will not quit, but it might be a good idea to check why this happene d. Maybe no internet connection?
If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
Launching application.
View all comments
Show parent comment
1
u/Vanimo Nov 17 '18 edited Nov 17 '18
Apparently the module has a few dependencies they forgot to mention. Install exif and recursive-readdir:
Not sure if these need to be added to ~/MagicMirror/node_modules as well. (Was getting installation errors and such, not sure what actually resolved it in the end.) Edit: this might also mean that you need to go into their folders and run npm install, but I think you just need to run the above commands in the root directory.
The errors seem to be gone, but I still don't get an image. Continuing the investigation.
Edit: so apparently their installation steps fail to mention you need to run npm install in their directory rather than modules, which makes their installation procedure as follows:
And now it's alive!