Read the statement by Michael Teeuw here.
MMM-eswordoftheday prevents MM from launching
-
Hello All! I have recently installed the MMM-eswordoftheday module (here: https://github.com/daniel-windsor/MMM-eswordoftheday)
My mirror was working before the installation. I installed the module and added it to my config but now the mirror won’t launch, I get stuck with a black Electron box. When I look at the logs, I see the below:
0|mm | [2023-03-27 18:31:40.770] [ERROR] App threw an error during load
0|mm | [2023-03-27 18:31:40.773] [ERROR] Error: Cannot find module ‘axios’
0|mm | Require stack:
0|mm | - /home/pi/MagicMirror/modules/MMM-eswordoftheday/node_helper.js
0|mm | - /home/pi/MagicMirror/js/app.js
0|mm | - /home/pi/MagicMirror/js/electron.js
0|mm | - /home/pi/MagicMirror/node_modules/electron/dist/resources/default_app.asar/main.js
0|mm | -
0|mm | at Module._resolveFilename (internal/modules/cjs/loader.js:627:15)
0|mm | at Function.Module._resolveFilename (/home/pi/MagicMirror/node_modules/electron/dist/resources/electron.asar/common/reset-search-paths.js:41:16)
0|mm | at Function.Module._resolveFilename (/home/pi/MagicMirror/node_modules/module-alias/index.js:49:29)
0|mm | at Function.Module._load (internal/modules/cjs/loader.js:531:27)
0|mm | at Module.require (internal/modules/cjs/loader.js:685:19)
0|mm | at require (internal/modules/cjs/helpers.js:16:16)
0|mm | at Object. (/home/pi/MagicMirror/modules/MMM-eswordoftheday/node_helper.js:2:15)
0|mm | at Module._compile (internal/modules/cjs/loader.js:786:30)
0|mm | at Object.Module._extensions…js (internal/modules/cjs/loader.js:798:10)
0|mm | at Module.load (internal/modules/cjs/loader.js:645:32)
0|mm | [2023-03-27 18:31:40.783] [ERROR] Error: Cannot find module ‘axios’
0|mm | Require stack:
0|mm | - /home/pi/MagicMirror/modules/MMM-eswordoftheday/node_helper.js
0|mm | - /home/pi/MagicMirror/js/app.js
0|mm | - /home/pi/MagicMirror/js/electron.js
0|mm | - /home/pi/MagicMirror/node_modules/electron/dist/resources/default_app.asar/main.js
0|mm | -
0|mm | at Module._resolveFilename (internal/modules/cjs/loader.js:627:15)
0|mm | at Function.Module._resolveFilename (/home/pi/MagicMirror/node_modules/electron/dist/resources/electron.asar/common/reset-search-paths.js:41:16)
0|mm | at Function.Module._resolveFilename (/home/pi/MagicMirror/node_modules/module-alias/index.js:49:29)
0|mm | at Function.Module._load (internal/modules/cjs/loader.js:531:27)
0|mm | at Module.require (internal/modules/cjs/loader.js:685:19)
0|mm | at require (internal/modules/cjs/helpers.js:16:16)
0|mm | at Object. (/home/pi/MagicMirror/modules/MMM-eswordoftheday/node_helper.js:2:15)
0|mm | at Module._compile (internal/modules/cjs/loader.js:786:30)
0|mm | at Object.Module._extensions…js (internal/modules/cjs/loader.js:798:10)
0|mm | at Module.load (internal/modules/cjs/loader.js:645:32) {
0|mm | code: ‘MODULE_NOT_FOUND’,
0|mm | requireStack: [
0|mm | ‘/home/pi/MagicMirror/modules/MMM-eswordoftheday/node_helper.js’,
0|mm | ‘/home/pi/MagicMirror/js/app.js’,
0|mm | ‘/home/pi/MagicMirror/js/electron.js’,
0|mm | ‘/home/pi/MagicMirror/node_modules/electron/dist/resources/default_app.asar/main.js’,
0|mm | undefined
0|mm | ]
0|mm | }
0|mm | [2023-03-27 18:31:42.630] [LOG]
0|mm | Launching application.It looks like the error states it cannot find the module ‘axios’ or perhaps missing something from the stack below? The error states the module is missing but I’m not sure if it’s looking for some sort of dependency or prereq or if it’s pointing to the module itself? I’ve put my config through ESINT and no issues found with this specific module. I’ve tried a few things like restarting the service… Could anyone help me identify the issue so I may work towards a resolution? Any and all help is sincerely appreciated. Thank you!!!
-
@nipper2000h looks like u missed a step of the module installation steps
-
Thanks for the reply! It’s been a while, I copied the whole text instead of running each command… change directories and installed the module. The mirror starts and the module loads! but it’s still throwing the error below and the module just displays this dot below
0|mm | } 0|mm | [2023-03-27 18:31:40.749] [ERROR] WARNING! Could not load config file. Starting with default configuration. Error found: Error: Cannot find module 'axios' 0|mm | Require stack: 0|mm | - /home/pi/MagicMirror/modules/MMM-eswordoftheday/node_helper.js 0|mm | - /home/pi/MagicMirror/js/app.js 0|mm | - /home/pi/MagicMirror/js/electron.js 0|mm | - /home/pi/MagicMirror/node_modules/electron/dist/resources/default_app.asar/main.js 0|mm | - 0|mm | [2023-03-27 18:31:40.770] [ERROR] App threw an error during load 0|mm | [2023-03-27 18:31:40.773] [ERROR] Error: Cannot find module 'axios' 0|mm | Require stack: 0|mm | - /home/pi/MagicMirror/modules/MMM-eswordoftheday/node_helper.js 0|mm | - /home/pi/MagicMirror/js/app.js 0|mm | - /home/pi/MagicMirror/js/electron.js 0|mm | - /home/pi/MagicMirror/node_modules/electron/dist/resources/default_app.asar/main.js 0|mm | - 0|mm | at Module._resolveFilename (internal/modules/cjs/loader.js:627:15) 0|mm | at Function.Module._resolveFilename (/home/pi/MagicMirror/node_modules/electron/dist/resources/electron.asar/common/reset-search-paths.js:41:16) 0|mm | at Function.Module._resolveFilename (/home/pi/MagicMirror/node_modules/module-alias/index.js:49:29) 0|mm | at Function.Module._load (internal/modules/cjs/loader.js:531:27) 0|mm | at Module.require (internal/modules/cjs/loader.js:685:19) 0|mm | at require (internal/modules/cjs/helpers.js:16:16) 0|mm | at Object.<anonymous> (/home/pi/MagicMirror/modules/MMM-eswordoftheday/node_helper.js:2:15) 0|mm | at Module._compile (internal/modules/cjs/loader.js:786:30) 0|mm | at Object.Module._extensions..js (internal/modules/cjs/loader.js:798:10) 0|mm | at Module.load (internal/modules/cjs/loader.js:645:32) 0|mm | [2023-03-27 18:31:40.783] [ERROR] Error: Cannot find module 'axios' 0|mm | Require stack: 0|mm | - /home/pi/MagicMirror/modules/MMM-eswordoftheday/node_helper.js 0|mm | - /home/pi/MagicMirror/js/app.js 0|mm | - /home/pi/MagicMirror/js/electron.js 0|mm | - /home/pi/MagicMirror/node_modules/electron/dist/resources/default_app.asar/main.js 0|mm | - 0|mm | at Module._resolveFilename (internal/modules/cjs/loader.js:627:15) 0|mm | at Function.Module._resolveFilename (/home/pi/MagicMirror/node_modules/electron/dist/resources/electron.asar/common/reset-search-paths.js:41:16) 0|mm | at Function.Module._resolveFilename (/home/pi/MagicMirror/node_modules/module-alias/index.js:49:29) 0|mm | at Function.Module._load (internal/modules/cjs/loader.js:531:27) 0|mm | at Module.require (internal/modules/cjs/loader.js:685:19) 0|mm | at require (internal/modules/cjs/helpers.js:16:16) 0|mm | at Object.<anonymous> (/home/pi/MagicMirror/modules/MMM-eswordoftheday/node_helper.js:2:15) 0|mm | at Module._compile (internal/modules/cjs/loader.js:786:30) 0|mm | at Object.Module._extensions..js (internal/modules/cjs/loader.js:798:10) 0|mm | at Module.load (internal/modules/cjs/loader.js:645:32) { 0|mm | code: 'MODULE_NOT_FOUND', 0|mm | requireStack: [ 0|mm | '/home/pi/MagicMirror/modules/MMM-eswordoftheday/node_helper.js', 0|mm | '/home/pi/MagicMirror/js/app.js', 0|mm | '/home/pi/MagicMirror/js/electron.js', 0|mm | '/home/pi/MagicMirror/node_modules/electron/dist/resources/default_app.asar/main.js', 0|mm | undefined 0|mm | ] 0|mm | }
The config file has examples turned on
showExamples: true, showExampleTranslations: true,
The helper has something about requiring axios
const NodeHelper = require("node_helper") const axios = require("axios") const cheerio = require("cheerio")
Any idea?
-
@nipper2000h can’t find the module axios
means you did not runnpm install
in the module folder
cause the package.json for that modules declares it as a dependency
-
I too just installed this module following the directions on the dev’s Github and am also seeing the below:
It appears this module does not work ‘out of the box.’
-
@nipper2000h
I just got this working by referencing https://github.com/daniel-windsor/MMM-eswordoftheday/issues/6Here is what I did
cd into the MMM-eswordoftheday folder in /MagicMirror/modules
run the following commands:git checkout 7db81145a2e238f2400fa2e82407a9078790048c
npm install
Then stop and restart your magic mirror.
It is working for me now:
-
@BerkSmash1984
Yessir, thank you for posting here! This fixed my issue as well.@sdetweil
Thank you for the clarification! I really appreciate your help and this community!