kolbyjack / MMM-Wallpaper

MagicMirror module to display wallpapers from various online sources
https://magicmirror.builders/
MIT License
99 stars 31 forks source link

Failing to start magicmirror #62

Closed alexey-gamov closed 2 years ago

alexey-gamov commented 2 years ago
[25.01.2022 14:41.07.788] [ERROR] App threw an error during load
[25.01.2022 14:41.07.795] [ERROR] Error: Cannot find module 'request'

Require stack:
- /opt/magic_mirror/modules/MMM-Wallpaper/node_helper.js
- /opt/magic_mirror/js/app.js
- /opt/magic_mirror/js/electron.js
- /opt/magic_mirror/node_modules/electron/dist/resources/default_app.asar/main.js
-
    at Module._resolveFilename (node:internal/modules/cjs/loader:940:15)
    at Function.n._resolveFilename (node:electron/js2c/browser_init:249:1128)
    at Function.Module._resolveFilename (/opt/magic_mirror/node_modules/module-alias/index.js:49:29)
    at Module._load (node:internal/modules/cjs/loader:785:27)
    at Function.c._load (node:electron/js2c/asar_bundle:5:13331)
    at Module.require (node:internal/modules/cjs/loader:1012:19)
    at require (node:internal/modules/cjs/helpers:94:18)
    at Object.<anonymous> (/opt/magic_mirror/modules/MMM-Wallpaper/node_helper.js:4:17)
    at Module._compile (node:internal/modules/cjs/loader:1116:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1169:10)

[25.01.2022 14:41.07.800] [ERROR] Whoops! There was an uncaught exception...
[25.01.2022 14:41.07.821] [ERROR] Error: Cannot find module 'request'

Require stack:
- /opt/magic_mirror/modules/MMM-Wallpaper/node_helper.js
- /opt/magic_mirror/js/app.js
- /opt/magic_mirror/js/electron.js
- /opt/magic_mirror/node_modules/electron/dist/resources/default_app.asar/main.js
-
    at Module._resolveFilename (node:internal/modules/cjs/loader:940:15)
    at Function.n._resolveFilename (node:electron/js2c/browser_init:249:1128)
    at Function.Module._resolveFilename (/opt/magic_mirror/node_modules/module-alias/index.js:49:29)
    at Module._load (node:internal/modules/cjs/loader:785:27)
    at Function.c._load (node:electron/js2c/asar_bundle:5:13331)
    at Module.require (node:internal/modules/cjs/loader:1012:19)
    at require (node:internal/modules/cjs/helpers:94:18)
    at Object.<anonymous> (/opt/magic_mirror/modules/MMM-Wallpaper/node_helper.js:4:17)
    at Module._compile (node:internal/modules/cjs/loader:1116:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1169:10) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/opt/magic_mirror/modules/MMM-Wallpaper/node_helper.js',
    '/opt/magic_mirror/js/app.js',
    '/opt/magic_mirror/js/electron.js',
    '/opt/magic_mirror/node_modules/electron/dist/resources/default_app.asar/main.js',
    undefined
  ]
}
[25.01.2022 14:41.07.826] [ERROR] MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
[25.01.2022 14:41.07.828] [ERROR] If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
kolbyjack commented 2 years ago

It looks like you didn't perform the Install the module dependencies step:

cd MMM-Wallpaper
npm install
alexey-gamov commented 2 years ago

Thank you! If someone is using MagicMirror inside docker container - this command will help:

docker exec -it mm npm install --prefix ./modules/MMM-Wallpaper