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.

    Mirror fails to start upon update

    Scheduled Pinned Locked Moved Solved Troubleshooting
    5 Posts 3 Posters 455 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.
    • N Offline
      nakulbende
      last edited by

      I had a magicmirror on raspberyr pi 3 that I started after a year. Chronologically,

      • everything worked perfectly as before
      • updated raspi and magicmirror
      • MM not starting anymore

      I use to be able to troubleshoot these myself, but I have been away from this project for 2 years. Can I get some help to point me in the right direction please?

      Here are the common outputs:

      • pm2 status MagicMirror (even though nothing is being displayed)
      ┌────┬────────────────────┬──────────┬──────┬───────────┬──────────┬──────────┐
      │ id │ name               │ mode     │ ↺    │ status    │ cpu      │ memory   │
      ├────┼────────────────────┼──────────┼──────┼───────────┼──────────┼──────────┤
      │ 0  │ MagicMirror        │ fork     │ 1    │ online    │ 0%       │ 2.6mb    │
      └────┴────────────────────┴──────────┴──────┴───────────┴──────────┴──────────┘
      
      
      • npm run config:check
      > node js/check_config.js
      
      /home/pi/MagicMirror/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2383
      const require$1 = Module.createRequire(require('url').pathToFileURL(__filename).toString());
                               ^
      
      TypeError: Module.createRequire is not a function
          at Object.<anonymous> (/home/pi/MagicMirror/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2383:26)
          at Module._compile (internal/modules/cjs/loader.js:778:30)
          at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
          at Module.load (internal/modules/cjs/loader.js:653:32)
          at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
          at Function.Module._load (internal/modules/cjs/loader.js:585:3)
          at Module.require (internal/modules/cjs/loader.js:692:17)
          at require (internal/modules/cjs/helpers.js:25:18)
          at Object.<anonymous> (/home/pi/MagicMirror/node_modules/eslint/lib/cli-engine/cli-engine.js:33:5)
          at Module._compile (internal/modules/cjs/loader.js:778:30)
      npm ERR! code ELIFECYCLE
      npm ERR! errno 1
      npm ERR! magicmirror@2.23.0 config:check: `node js/check_config.js`
      npm ERR! Exit status 1
      npm ERR! 
      npm ERR! Failed at the magicmirror@2.23.0 config:check script.
      npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
      
      npm ERR! A complete log of this run can be found in:
      npm ERR!     /home/pi/.npm/_logs/2023-05-25T12_44_27_070Z-debug.log
      
      • In pm2 error logs
      [23.05.2023 16:07.34.099] [ERROR] (node:924) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
      MESA-LOADER: failed to retrieve device information
      MESA-LOADER: failed to retrieve device information
      MESA-LOADER: failed to retrieve device information
      /home/pi/MagicMirror/node_modules/electron/dist/electron exited with signal SIGINT
      [24.05.2023 09:49.11.903] [WARN]  No /home/pi/MagicMirror/js/../modules/currentweather/currentweather.js found for module: currentweather.
      [24.05.2023 09:49.12.450] [ERROR] (node:13127) UnhandledPromiseRejectionWarning: Error: Cannot find module 'googleapis'
      Require stack:
      - /home/pi/MagicMirror/modules/MMM-Buller/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 (node:internal/modules/cjs/loader:963:15)
          at n._resolveFilename (node:electron/js2c/browser_init:2:109751)
          at Module._resolveFilename (/home/pi/MagicMirror/node_modules/module-alias/index.js:49:29)
          at Module._load (node:internal/modules/cjs/loader:811:27)
          at f._load (node:electron/js2c/asar_bundle:2:13330)
          at Module.require (node:internal/modules/cjs/loader:1035:19)
          at require (node:internal/modules/cjs/helpers:102:18)
          at Object.<anonymous> (/home/pi/MagicMirror/modules/MMM-Buller/node_helper.js:14:18)
          at Module._compile (node:internal/modules/cjs/loader:1141:14)
          at Module._extensions..js (node:internal/modules/cjs/loader:1196:10)
          at Module.load (node:internal/modules/cjs/loader:1011:32)
          at Module._load (node:internal/modules/cjs/loader:846:12)
          at f._load (node:electron/js2c/asar_bundle:2:13330)
          at Module.require (node:internal/modules/cjs/loader:1035:19)
          at require (node:internal/modules/cjs/helpers:102:18)
          at loadModule (/home/pi/MagicMirror/js/app.js:184:19)
      (Use `electron --trace-warnings ...` to show where the warning was created)
      [24.05.2023 09:49.12.452] [ERROR] (node:13127) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI
      
      • In case it is useful, I ran npm run install-mm again for the following output
      > magicmirror@2.23.0 install-mm /home/pi/MagicMirror
      > npm install --no-audit --no-fund --no-update-notifier --only=prod --omit=dev
      
      [..................] | rollbackFailedOptional: verb npm-session 6b05a62f7
      
      > magicmirror@2.23.0 postinstall /home/pi/MagicMirror
      > npm run install-vendor && npm run install-fonts && echo "MagicMirror² installation finished successfully! 
      "
      
      
      > magicmirror@2.23.0 install-vendor /home/pi/MagicMirror
      > echo "Installing vendor files ...
      " && cd vendor && npm install --loglevel=error --no-audit --no-fund --no-update-notifier
      
      Installing vendor files ...
      
      up to date in 7.855s
      
      > magicmirror@2.23.0 install-fonts /home/pi/MagicMirror
      > echo "Installing fonts ...
      " && cd fonts && npm install --loglevel=error --no-audit --no-fund --no-update-notifier
      
      Installing fonts ...
      
      up to date in 5.068s
      MagicMirror² installation finished successfully! 
      
      up to date in 133.275s
      
      
      N S 2 Replies Last reply Reply Quote 0
      • N Offline
        nakulbende @nakulbende
        last edited by

        Here is the output to npm start from MagicMirror folder after I removed most of the modules from configuration - just clock and calendar.

        > DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js
        
        [25.05.2023 09:10.17.646] [LOG]   Starting MagicMirror: v2.23.0
        [25.05.2023 09:10.17.671] [LOG]   Loading config ...
        [25.05.2023 09:10.17.680] [DEBUG] config template file not exists, no envsubst
        [25.05.2023 09:10.17.697] [LOG]   Loading module helpers ...
        [25.05.2023 09:10.17.700] [LOG]   No helper found for module: clock.
        [25.05.2023 09:10.17.702] [LOG]   No helper found for module: calendar_monthly.
        [25.05.2023 09:10.18.227] [LOG]   Initializing new module helper ...
        [25.05.2023 09:10.18.229] [LOG]   Module helper loaded: calendar
        [25.05.2023 09:10.18.253] [ERROR] (node:23106) UnhandledPromiseRejectionWarning: Error: Cannot find module 'googleapis'
        Require stack:
        - /home/pi/MagicMirror/modules/MMM-Buller/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 (node:internal/modules/cjs/loader:963:15)
            at n._resolveFilename (node:electron/js2c/browser_init:2:109751)
            at Module._resolveFilename (/home/pi/MagicMirror/node_modules/module-alias/index.js:49:29)
            at Module._load (node:internal/modules/cjs/loader:811:27)
            at f._load (node:electron/js2c/asar_bundle:2:13330)
            at Module.require (node:internal/modules/cjs/loader:1035:19)
            at require (node:internal/modules/cjs/helpers:102:18)
            at Object.<anonymous> (/home/pi/MagicMirror/modules/MMM-Buller/node_helper.js:14:18)
            at Module._compile (node:internal/modules/cjs/loader:1141:14)
            at Module._extensions..js (node:internal/modules/cjs/loader:1196:10)
            at Module.load (node:internal/modules/cjs/loader:1011:32)
            at Module._load (node:internal/modules/cjs/loader:846:12)
            at f._load (node:electron/js2c/asar_bundle:2:13330)
            at Module.require (node:internal/modules/cjs/loader:1035:19)
            at require (node:internal/modules/cjs/helpers:102:18)
            at loadModule (/home/pi/MagicMirror/js/app.js:184:19)
        (Use `electron --trace-warnings ...` to show where the warning was created)
        [25.05.2023 09:10.18.255] [ERROR] (node:23106) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
        [25.05.2023 09:10.18.801] [LOG]   Launching application.
        MESA-LOADER: failed to retrieve device information
        MESA-LOADER: failed to retrieve device information
        MESA-LOADER: failed to retrieve device information
        
        M 1 Reply Last reply Reply Quote 0
        • M Offline
          MMRIZE @nakulbende
          last edited by

          @nakulbende
          Some third-party modules(in your case, seems MMM-Buller) may need a rebuild also. Go to each module’s directory and reinstall/upgrade it. (or they may have some guide for it)

          S 1 Reply Last reply Reply Quote 0
          • S Away
            sdetweil @MMRIZE
            last edited by

            @MMRIZE or try my upgrade script which does that

            see
            https://github.com/sdetweil/MagicMirror_scripts
            will have to use

            force
            

            as the parameter instead of

            apply 
            

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            1 Reply Last reply Reply Quote 0
            • S Away
              sdetweil @nakulbende
              last edited by

              @nakulbende on the createRequire

              see
              https://github.com/MichMich/MagicMirror/issues/2772

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              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