• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
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.

Help. MM doesn't work Anymore

Scheduled Pinned Locked Moved Solved Troubleshooting
10 Posts 3 Posters 863 Views 3 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
    sdetweil @Extra
    last edited by Jan 23, 2022, 1:55 AM

    @extra do

    cd ~/MagicMirror
    rm -rf node_modules
    rm package-lock.json
    npm install --only=prod
    

    then try starting

    Sam

    How to add modules

    learning how to use browser developers window for css changes

    E 1 Reply Last reply Jan 23, 2022, 6:51 PM Reply Quote 0
    • E Offline
      Extra @sdetweil
      last edited by Jan 23, 2022, 6:51 PM

      @sdetweil No, sadly this didn’t work. I still get the same error and a blank black screen.
      Is there anything else I can do? Or do I have to uninstall and reinstall MM?

      S 1 Reply Last reply Jan 23, 2022, 7:51 PM Reply Quote 0
      • S Offline
        sdetweil @Extra
        last edited by Jan 23, 2022, 7:51 PM

        @extra no, need to seek the messages now

        where u do npm start

        if using pm2 then

        pm2 logs --lines=50

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        E 1 Reply Last reply Jan 23, 2022, 7:59 PM Reply Quote 0
        • E Offline
          Extra @sdetweil
          last edited by Jan 23, 2022, 7:59 PM

          @sdetweil I do npm start in

          ~/MagicMirror/modules/MMM-SmartTouch
          

          I don’t use pm2

          
          
          ~/MagicMirror/modules/MMM-SmartTouch $ pm2 logs--lines=50
          [PM2] Spawning PM2 daemon with pm2_home=/home/pi/.pm2
          [PM2] PM2 Successfully daemonized
          [PM2][ERROR] Command not found
          
          usage: pm2 [options] <command>
          
          pm2 -h, --help             all available commands and options
          pm2 examples               display pm2 usage examples
          pm2 <command> -h           help on a specific command
          
          Access pm2 files in ~/.pm2
          
          
          
          
          
          ~/MagicMirror/modules/MMM-SmartTouch $ npm start
          
          > magicmirror@2.18.0 start
          > DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js
          
          [23.01.2022 14:55.16.782] [LOG]   Starting MagicMirror: v2.18.0
          [23.01.2022 14:55.16.820] [LOG]   Loading config ...
          [23.01.2022 14:55.16.861] [LOG]   Loading module helpers ...
          [23.01.2022 14:55.16.877] [LOG]   No helper found for module: alert.
          [23.01.2022 14:55.16.929] [LOG]   Initializing new module helper ...
          [23.01.2022 14:55.16.932] [LOG]   Module helper loaded: updatenotification
          [23.01.2022 14:55.16.934] [LOG]   No helper found for module: clock.
          [23.01.2022 14:55.17.400] [ERROR] WARNING! Could not load config file. Starting with default configuration. Error found: Error [ERR_REQUIRE_ESM]: require() of ES Module /home/pi/MagicMirror/node_modules/node-fetch/src/index.js from /home/pi/MagicMirror/modules/default/calendar/calendarfetcher.js not supported.
          Instead change the require of index.js in /home/pi/MagicMirror/modules/default/calendar/calendarfetcher.js to a dynamic import() which is available in all CommonJS modules.
          [23.01.2022 14:55.17.403] [LOG]   Loading module helpers ...
          [23.01.2022 14:55.17.406] [LOG]   No helper found for module: alert.
          [23.01.2022 14:55.17.408] [LOG]   Initializing new module helper ...
          [23.01.2022 14:55.17.409] [LOG]   Module helper loaded: updatenotification
          [23.01.2022 14:55.17.416] [LOG]   No helper found for module: clock.
          [23.01.2022 14:55.17.485] [ERROR] App threw an error during load
          [23.01.2022 14:55.17.487] [ERROR] Error [ERR_REQUIRE_ESM]: require() of ES Module /home/pi/MagicMirror/node_modules/node-fetch/src/index.js from /home/pi/MagicMirror/modules/default/calendar/calendarfetcher.js not supported.
          Instead change the require of index.js in /home/pi/MagicMirror/modules/default/calendar/calendarfetcher.js to a dynamic import() which is available in all CommonJS modules.
              at Function.c._load (node:electron/js2c/asar_bundle:5:13331)
              at Object.<anonymous> (/home/pi/MagicMirror/modules/default/calendar/calendarfetcher.js:11:15)
              at Function.c._load (node:electron/js2c/asar_bundle:5:13331)
              at Object.<anonymous> (/home/pi/MagicMirror/modules/default/calendar/node_helper.js:8:25)
              at Function.c._load (node:electron/js2c/asar_bundle:5:13331)
              at loadModule (/home/pi/MagicMirror/js/app.js:127:19)
              at loadNextModule (/home/pi/MagicMirror/js/app.js:165:5)
              at /home/pi/MagicMirror/js/app.js:167:6
              at loadModule (/home/pi/MagicMirror/js/app.js:146:4)
              at loadNextModule (/home/pi/MagicMirror/js/app.js:165:5)
              at /home/pi/MagicMirror/js/app.js:167:6
              at Class.loaded (/home/pi/MagicMirror/js/node_helper.js:18:3)
              at loadModule (/home/pi/MagicMirror/js/app.js:144:6)
              at loadNextModule (/home/pi/MagicMirror/js/app.js:165:5)
              at /home/pi/MagicMirror/js/app.js:167:6
              at loadModule (/home/pi/MagicMirror/js/app.js:146:4)
              at loadNextModule (/home/pi/MagicMirror/js/app.js:165:5)
              at loadModules (/home/pi/MagicMirror/js/app.js:176:3)
              at /home/pi/MagicMirror/js/app.js:225:4
              at loadConfig (/home/pi/MagicMirror/js/app.js:81:4)
              at App.start (/home/pi/MagicMirror/js/app.js:212:3)
              at Object.<anonymous> (/home/pi/MagicMirror/js/electron.js:153:7)
              at Function.c._load (node:electron/js2c/asar_bundle:5:13331)
              at loadApplicationPackage (/home/pi/MagicMirror/node_modules/electron/dist/resources/default_app.asar/main.js:110:16)
              at Object.<anonymous> (/home/pi/MagicMirror/node_modules/electron/dist/resources/default_app.asar/main.js:222:9)
              at Function.c._load (node:electron/js2c/asar_bundle:5:13331)
              at Object.<anonymous> (node:electron/js2c/browser_init:193:3197)
              at Object../lib/browser/init.ts (node:electron/js2c/browser_init:193:3401)
              at __webpack_require__ (node:electron/js2c/browser_init:1:128)
              at node:electron/js2c/browser_init:1:1200
              at node:electron/js2c/browser_init:1:1267
              at Function.c._load (node:electron/js2c/asar_bundle:5:13331)
          [23.01.2022 14:55.17.489] [ERROR] Whoops! There was an uncaught exception...
          [23.01.2022 14:55.17.502] [ERROR] Error [ERR_REQUIRE_ESM]: require() of ES Module /home/pi/MagicMirror/node_modules/node-fetch/src/index.js from /home/pi/MagicMirror/modules/default/calendar/calendarfetcher.js not supported.
          Instead change the require of index.js in /home/pi/MagicMirror/modules/default/calendar/calendarfetcher.js to a dynamic import() which is available in all CommonJS modules.
              at Function.c._load (node:electron/js2c/asar_bundle:5:13331)
              at Object.<anonymous> (/home/pi/MagicMirror/modules/default/calendar/calendarfetcher.js:11:15)
              at Function.c._load (node:electron/js2c/asar_bundle:5:13331)
              at Object.<anonymous> (/home/pi/MagicMirror/modules/default/calendar/node_helper.js:8:25)
              at Function.c._load (node:electron/js2c/asar_bundle:5:13331)
              at loadModule (/home/pi/MagicMirror/js/app.js:127:19)
              at loadNextModule (/home/pi/MagicMirror/js/app.js:165:5)
              at /home/pi/MagicMirror/js/app.js:167:6
              at loadModule (/home/pi/MagicMirror/js/app.js:146:4)
              at loadNextModule (/home/pi/MagicMirror/js/app.js:165:5)
              at /home/pi/MagicMirror/js/app.js:167:6
              at Class.loaded (/home/pi/MagicMirror/js/node_helper.js:18:3)
              at loadModule (/home/pi/MagicMirror/js/app.js:144:6)
              at loadNextModule (/home/pi/MagicMirror/js/app.js:165:5)
              at /home/pi/MagicMirror/js/app.js:167:6
              at loadModule (/home/pi/MagicMirror/js/app.js:146:4)
              at loadNextModule (/home/pi/MagicMirror/js/app.js:165:5)
              at loadModules (/home/pi/MagicMirror/js/app.js:176:3)
              at /home/pi/MagicMirror/js/app.js:225:4
              at loadConfig (/home/pi/MagicMirror/js/app.js:81:4)
              at App.start (/home/pi/MagicMirror/js/app.js:212:3)
              at Object.<anonymous> (/home/pi/MagicMirror/js/electron.js:153:7)
              at Function.c._load (node:electron/js2c/asar_bundle:5:13331)
              at loadApplicationPackage (/home/pi/MagicMirror/node_modules/electron/dist/resources/default_app.asar/main.js:110:16)
              at Object.<anonymous> (/home/pi/MagicMirror/node_modules/electron/dist/resources/default_app.asar/main.js:222:9)
              at Function.c._load (node:electron/js2c/asar_bundle:5:13331)
              at Object.<anonymous> (node:electron/js2c/browser_init:193:3197)
              at Object../lib/browser/init.ts (node:electron/js2c/browser_init:193:3401)
              at __webpack_require__ (node:electron/js2c/browser_init:1:128)
              at node:electron/js2c/browser_init:1:1200
              at node:electron/js2c/browser_init:1:1267
              at Function.c._load (node:electron/js2c/asar_bundle:5:13331) {
            code: 'ERR_REQUIRE_ESM'
          }
          [23.01.2022 14:55.17.508] [ERROR] MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
          [23.01.2022 14:55.17.509] [ERROR] If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
          [23.01.2022 14:55.18.455] [LOG]   Launching application.
          [1416:0123/145520.523134:ERROR:viz_main_impl.cc(161)] Exiting GPU process due to errors during initialization
          [1446:0123/145521.167121:ERROR:sandbox_linux.cc(376)] InitializeSandbox() called with multiple threads in process gpu-process.
          [23.01.2022 14:55.24.239] [LOG]   Shutting down server...
          [23.01.2022 14:55.24.245] [LOG]   Stopping module helper: updatenotification
          [23.01.2022 14:55.24.246] [LOG]   Stopping module helper: updatenotification
          [23.01.2022 14:55.24.248] [ERROR] Whoops! There was an uncaught exception...
          [23.01.2022 14:55.24.252] [ERROR] TypeError: Cannot read properties of undefined (reading 'close')
              at App.stop (/home/pi/MagicMirror/js/app.js:257:14)
              at App.<anonymous> (/home/pi/MagicMirror/js/electron.js:139:7)
              at App.emit (node:events:394:28)
              at appMethod (node:electron/js2c/browser_init:69:1830)
              at Object.execute (node:electron/js2c/browser_init:69:5623)
              at MenuItem.click (node:electron/js2c/browser_init:73:1862)
              at Object.a._executeCommand (node:electron/js2c/browser_init:81:2453)
          [23.01.2022 14:55.24.255] [ERROR] MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
          [23.01.2022 14:55.24.258] [ERROR] If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
          
          
          S M 2 Replies Last reply Jan 23, 2022, 8:42 PM Reply Quote 0
          • S Offline
            sdetweil @Extra
            last edited by Jan 23, 2022, 8:42 PM

            @extra so, what have you done

            did those commands
            black screen
            and since then?

            this looks like you did an npm install in the wrong folder

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            E 1 Reply Last reply Jan 23, 2022, 8:57 PM Reply Quote 0
            • E Offline
              Extra @sdetweil
              last edited by Jan 23, 2022, 8:57 PM

              @sdetweil I just copied my config file to a usb, uninstalled MM, and re-installed it and replaced the config file with the one from my usb. It’s back to normal now.

              I appreciate the help though. Thanks again.

              S 1 Reply Last reply Jan 23, 2022, 8:58 PM Reply Quote 0
              • S Offline
                sdetweil @Extra
                last edited by Jan 23, 2022, 8:58 PM

                @extra how did u install?

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                E 1 Reply Last reply Jan 23, 2022, 9:05 PM Reply Quote 0
                • E Offline
                  Extra @sdetweil
                  last edited by Extra Jan 23, 2022, 9:06 PM Jan 23, 2022, 9:05 PM

                  @sdetweil I followed the steps on the docs (manual installation): https://docs.magicmirror.builders/getting-started/installation.html

                  Then downloaded the MMM-SmartTouch module and followed those setup instructions here: https://github.com/EbenKouao/MMM-SmartTouch

                  1 Reply Last reply Reply Quote 0
                  • M Offline
                    mumblebaj Module Developer @Extra
                    last edited by Jan 24, 2022, 4:58 PM

                    @extra said in Help. MM doesn't work Anymore:

                    [23.01.2022 14:55.17.502] [ERROR] Error [ERR_REQUIRE_ESM]: require() of ES Module /home/pi/MagicMirror/node_modules/node-fetch/src/index.js from /home/pi/MagicMirror/modules/default/calendar/calendarfetcher.js not supported.
                    Instead change the require of index.js in /home/pi/MagicMirror/modules/default/calendar/calendarfetcher.js to a dynamic import() which is available in all CommonJS modules.

                    This is the wrong version of node-fetch that is installed on MM. You need to downgrade node-fetch to v2.6.1 or something earlier than v3 where the module was change to an ES module. I would uninstall node-fetch and check which module uses it and what specific version and install the correct version.

                    Check out my modules at: https://github.com/mumblebaj?tab=repositories

                    1 Reply Last reply Reply Quote 1
                    • 1 / 1
                    1 / 1
                    • First post
                      6/10
                      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