MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    Module resulting black screen "electron"

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    3 Posts 2 Posters 590 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S Offline
      sultan.y
      last edited by

      New to Magic Mirror

      have been trying to install the MMM Prayer Times module, but eery time all i see is a black screen “electron”

      i start magic mirror using npm run start

      when i comment out the module, everything works fine, not sure what im doing wrong, this is the error i get

      pi@raspberrypi:~ $ cd MagicMirror/
      pi@raspberrypi:~/MagicMirror $ npm run start

      magicmirror@2.17.1 start /home/pi/MagicMirror
      DISPLAY=“${DISPLAY:=:0}” ./node_modules/.bin/electron js/electron.js

      [21.12.2021 16:14.55.709] [LOG] Starting MagicMirror: v2.17.1
      [21.12.2021 16:14.55.720] [LOG] Loading config …
      [21.12.2021 16:14.55.726] [LOG] Loading module helpers …
      [21.12.2021 16:14.55.734] [ERROR] WARNING! Could not load config file. Starting with default configuration. Error found: Error: Cannot find module ‘request’
      Require stack:

      • /home/pi/MagicMirror/modules/MMM-MyPrayerTimes/node_helper.js
      • /home/pi/MagicMirror/js/app.js
      • /home/pi/MagicMirror/js/electron.js
      • /home/pi/MagicMirror/node_modules/electron/dist/resources/default_app.asar/main.js

      [21.12.2021 16:14.55.735] [LOG] Loading module helpers …
      [21.12.2021 16:14.55.738] [ERROR] App threw an error during load
      [21.12.2021 16:14.55.741] [ERROR] Error: Cannot find module ‘request’
      Require stack:

      • /home/pi/MagicMirror/modules/MMM-MyPrayerTimes/node_helper.js
      • /home/pi/MagicMirror/js/app.js
      • /home/pi/MagicMirror/js/electron.js
      • /home/pi/MagicMirror/node_modules/electron/dist/resources/default_app.asar/main.js
      • at Module._resolveFilename (internal/modules/cjs/loader.js:887:15)
        at Function.n._resolveFilename (electron/js2c/browser_init.js:257:1128)
        at Function.Module._resolveFilename (/home/pi/MagicMirror/node_modules/module-alias/index.js:49:29)
        at Module._load (internal/modules/cjs/loader.js:732:27)
        at Function.f._load (electron/js2c/asar_bundle.js:5:12913)
        at Module.require (internal/modules/cjs/loader.js:959:19)
        at require (internal/modules/cjs/helpers.js:88:18)
        at Object. (/home/pi/MagicMirror/modules/MMM-MyPrayerTimes/node_helper.js:10:17)
        at Module._compile (internal/modules/cjs/loader.js:1078:30)
        at Object.Module._extensions…js (internal/modules/cjs/loader.js:1108:10)
        [21.12.2021 16:14.55.743] [ERROR] Whoops! There was an uncaught exception…
        [21.12.2021 16:14.55.751] [ERROR] Error: Cannot find module ‘request’
        Require stack:
      • /home/pi/MagicMirror/modules/MMM-MyPrayerTimes/node_helper.js
      • /home/pi/MagicMirror/js/app.js
      • /home/pi/MagicMirror/js/electron.js
      • /home/pi/MagicMirror/node_modules/electron/dist/resources/default_app.asar/main.js
      • at Module._resolveFilename (internal/modules/cjs/loader.js:887:15)
        at Function.n._resolveFilename (electron/js2c/browser_init.js:257:1128)
        at Function.Module._resolveFilename (/home/pi/MagicMirror/node_modules/module-alias/index.js:49:29)
        at Module._load (internal/modules/cjs/loader.js:732:27)
        at Function.f._load (electron/js2c/asar_bundle.js:5:12913)
        at Module.require (internal/modules/cjs/loader.js:959:19)
        at require (internal/modules/cjs/helpers.js:88:18)
        at Object. (/home/pi/MagicMirror/modules/MMM-MyPrayerTimes/node_helper.js:10:17)
        at Module._compile (internal/modules/cjs/loader.js:1078:30)
        at Object.Module._extensions…js (internal/modules/cjs/loader.js:1108:10) {
        code: ‘MODULE_NOT_FOUND’,
        requireStack: [
        ‘/home/pi/MagicMirror/modules/MMM-MyPrayerTimes/node_helper.js’,
        ‘/home/pi/MagicMirror/js/app.js’,
        ‘/home/pi/MagicMirror/js/electron.js’,
        ‘/home/pi/MagicMirror/node_modules/electron/dist/resources/default_app.asar/main.js’,
        undefined
        ]
        }
        [21.12.2021 16:14.55.755] [ERROR] MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
        [21.12.2021 16:14.55.756] [ERROR] If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
        [21.12.2021 16:14.56.003] [LOG] Launching application.
        ^C[21.12.2021 16:15.51.413] [LOG] Shutting down server…
        [21.12.2021 16:15.51.418] [ERROR] Whoops! There was an uncaught exception…
        [21.12.2021 16:15.51.423] [ERROR] TypeError: Cannot read property ‘close’ of undefined
        at App.stop (/home/pi/MagicMirror/js/app.js:257:14)
        at App. (/home/pi/MagicMirror/js/electron.js:139:7)
        at App.emit (events.js:315:20)
        [21.12.2021 16:15.51.426] [ERROR] MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
        [21.12.2021 16:15.51.427] [ERROR] If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
      S 1 Reply Last reply Reply Quote 0
      • S Away
        sdetweil @sultan.y
        last edited by

        @sultan-y see
        https://forum.magicmirror.builders/topic/15778/fix-for-black-screen-in-2-16-and-later

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        S 1 Reply Last reply Reply Quote 0
        • S Offline
          sultan.y @sdetweil
          last edited by

          @sdetweil

          excellent! Solved!!

          In recent mm releases we have removed libraries that are discontinued ( aka deprecated).

          many mm modules used these but didn’t document it. so they fail

          to fix this you need to install the library in the module folder

          if the module does NOT provide a file called package.json, then do

          npm init -y
          then regardless do

          npm install request

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post
          Enjoying MagicMirror? Please consider a donation!
          MagicMirror created by Michael Teeuw.
          Forum managed by Sam, technical setup by Karsten.
          This forum is using NodeBB as its core | Contributors
          Contact | Privacy Policy