• 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.

Magic Mirror Update fail

Scheduled Pinned Locked Moved Solved Troubleshooting
8 Posts 4 Posters 1.2k Views 4 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.
  • F Offline
    Freddy_boy
    last edited by Oct 3, 2023, 5:31 PM

    I just attempted to update to the latest version of Magic Mirror, and now I can’t get it to start… Can anyone provide any suggestions? Here is what I am seeing now:

    pi@raspberrypi:~/MagicMirror $ npm run start

    magicmirror@2.25.0 start
    DISPLAY=“${DISPLAY:=:0}” ./node_modules/.bin/electron js/electron.js

    [03.10.2023 12:06.38.811] [LOG] Starting MagicMirror: v2.25.0
    [03.10.2023 12:06.38.822] [LOG] Loading config …
    [03.10.2023 12:06.38.825] [DEBUG] config template file not exists, no envsubst
    [03.10.2023 12:06.38.829] [LOG] Loading module helpers …
    [03.10.2023 12:06.38.831] [LOG] No helper found for module: alert.
    [03.10.2023 12:06.38.868] [LOG] Initializing new module helper …
    [03.10.2023 12:06.38.870] [LOG] Module helper loaded: updatenotification
    [03.10.2023 12:06.38.871] [LOG] No helper found for module: clock.
    [03.10.2023 12:06.39.093] [LOG] Initializing new module helper …
    [03.10.2023 12:06.39.094] [LOG] Module helper loaded: calendar
    [03.10.2023 12:06.39.095] [LOG] No helper found for module: calendar_monthly.
    [03.10.2023 12:06.39.099] [LOG] Initializing new module helper …
    [03.10.2023 12:06.39.100] [LOG] Module helper loaded: MMM-Pir
    [03.10.2023 12:06.39.104] [ERROR] (node:2935) UnhandledPromiseRejectionWarning: Error: Cannot find module ‘node-fetch’
    Require stack:

    • /home/pi/MagicMirror/modules/MMM-Weather/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 node:internal/modules/cjs/loader:1084:15
      at Function. (node:electron/js2c/browser_init:2:117419)
      at Module._resolveFilename (/home/pi/MagicMirror/node_modules/module-alias/index.js:49:29)
      at node:internal/modules/cjs/loader:929:27
      at Function._load (node:electron/js2c/asar_bundle:2:13327)
      at Module.require (node:internal/modules/cjs/loader:1150:19)
      at require (node:internal/modules/cjs/helpers:110:18)
      at Object. (/home/pi/MagicMirror/modules/MMM-Weather/node_helper.js:11:15)
      at Module._compile (node:internal/modules/cjs/loader:1271:14)
      at Object…js (node:internal/modules/cjs/loader:1326:10)
      at Module.load (node:internal/modules/cjs/loader:1126:32)
      at node:internal/modules/cjs/loader:967:12
      at Function._load (node:electron/js2c/asar_bundle:2:13327)
      at Module.require (node:internal/modules/cjs/loader:1150:19)
      at require (node:internal/modules/cjs/helpers:110:18)
      at loadModule (/home/pi/MagicMirror/js/app.js:180:19)
      (Use electron --trace-warnings ... to show where the warning was created)
      [03.10.2023 12:06.39.104] [ERROR] (node:2935) 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: 1)
      WARNING: v3dv is neither a complete nor a conformant Vulkan implementation. Testing use only.
      [2935:1003/120639.849727:ERROR:object_proxy.cc(590)] Failed to call method: org.freedesktop.portal.Settings.Read: object_path= /org/freedesktop/portal/desktop: org.freedesktop.portal.Error.NotFound: Requested setting not found
      MESA-LOADER: failed to retrieve device information
      MESA-LOADER: failed to retrieve device information
      MESA-LOADER: failed to retrieve device information
      MESA-LOADER: failed to open kms_swrast: /usr/lib/dri/kms_swrast_dri.so: cannot open shared object file: Permission denied (search paths /usr/lib/arm-linux-gnueabihf/dri:$${ORIGIN}/dri:/usr/lib/dri)
      failed to load driver: kms_swrast
      MESA-LOADER: failed to open swrast: /usr/lib/dri/swrast_dri.so: cannot open shared object file: Permission denied (search paths /usr/lib/arm-linux-gnueabihf/dri:$${ORIGIN}/dri:/usr/lib/dri)
      failed to load swrast driver

    …and it just sits there… Can anyone help me to decipher these messages? Thanks…

    S 1 Reply Last reply Oct 3, 2023, 6:09 PM Reply Quote 0
    • S Away
      sdetweil @Freddy_boy
      last edited by Oct 3, 2023, 6:09 PM

      @Freddy_boy said in Magic Mirror Update fail:

      Cannot find module ‘node-fetch’

      this library was removed from the base in 2.25

      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

      F 1 Reply Last reply Oct 3, 2023, 8:16 PM Reply Quote 0
      • F Offline
        Freddy_boy @sdetweil
        last edited by Oct 3, 2023, 8:16 PM

        @sdetweil
        Thanks for the reply… I’ve gone to my MagicMirror/modules folder, and I can confirm that there is no module called ‘node-fetch’. Your post indicates that to fix this, the library needs to be installed in the module folder. The procedure continues to indicate that I need to change directories to the module that is having the problem… but it doesn’t exist…? Am I reading this correctly?

        S 1 Reply Last reply Oct 3, 2023, 8:18 PM Reply Quote 0
        • S Away
          sdetweil @Freddy_boy
          last edited by sdetweil Oct 3, 2023, 8:24 PM Oct 3, 2023, 8:18 PM

          @Freddy_boy said in Magic Mirror Update fail:

          The procedure continues to indicate that I need to change directories to the module that is having the problem, but it doesn’t exist…

          I don’t understand

          /home/pi/MagicMirror/modules/MMM-Weather/

          is the module having trouble…

          that is the folder to be active for the rest of my instructions

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          F 1 Reply Last reply Oct 3, 2023, 9:00 PM Reply Quote 0
          • F Offline
            Freddy_boy @sdetweil
            last edited by Oct 3, 2023, 9:00 PM

            @sdetweil

            Ok. I went to my /home/pi/MagicMirror/modules/MMM-Weather/ folder and I ran the ‘npm install node-fetch’ command. I am getting a different error now:

            pi@raspberrypi:~/MagicMirror $ npm run start

            magicmirror@2.25.0 start
            DISPLAY=“${DISPLAY:=:0}” ./node_modules/.bin/electron js/electron.js

            [03.10.2023 16:57.03.945] [LOG] Starting MagicMirror: v2.25.0
            [03.10.2023 16:57.03.956] [LOG] Loading config …
            [03.10.2023 16:57.03.958] [DEBUG] config template file not exists, no envsubst
            [03.10.2023 16:57.03.962] [LOG] Loading module helpers …
            [03.10.2023 16:57.03.964] [LOG] No helper found for module: alert.
            [03.10.2023 16:57.03.998] [LOG] Initializing new module helper …
            [03.10.2023 16:57.04.001] [LOG] Module helper loaded: updatenotification
            [03.10.2023 16:57.04.004] [LOG] No helper found for module: clock.
            [03.10.2023 16:57.04.238] [LOG] Initializing new module helper …
            [03.10.2023 16:57.04.239] [LOG] Module helper loaded: calendar
            [03.10.2023 16:57.04.240] [LOG] No helper found for module: calendar_monthly.
            [03.10.2023 16:57.04.244] [LOG] Initializing new module helper …
            [03.10.2023 16:57.04.245] [LOG] Module helper loaded: MMM-Pir
            [03.10.2023 16:57.04.342] [ERROR] (node:3203) UnhandledPromiseRejectionWarning: Error [ERR_REQUIRE_ESM]: require() of ES Module /home/pi/MagicMirror/modules/MMM-Weather/node_modules/node-fetch/src/index.js from /home/pi/MagicMirror/modules/MMM-Weather/node_helper.js not supported.
            Instead change the require of index.js in /home/pi/MagicMirror/modules/MMM-Weather/node_helper.js to a dynamic import() which is available in all CommonJS modules.
            at Function._load (node:electron/js2c/asar_bundle:2:13327)
            at Object. (/home/pi/MagicMirror/modules/MMM-Weather/node_helper.js:11:15)
            at Function._load (node:electron/js2c/asar_bundle:2:13327)
            at loadModule (/home/pi/MagicMirror/js/app.js:180:19)
            at loadModules (/home/pi/MagicMirror/js/app.js:210:10)
            at async App.start (/home/pi/MagicMirror/js/app.js:258:3)
            (Use electron --trace-warnings ... to show where the warning was created)
            [03.10.2023 16:57.04.342] [ERROR] (node:3203) 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: 1)
            WARNING: v3dv is neither a complete nor a conformant Vulkan implementation. Testing use only.
            [3203:1003/165705.081300:ERROR:object_proxy.cc(590)] Failed to call method: org.freedesktop.portal.Settings.Read: object_path= /org/freedesktop/portal/desktop: org.freedesktop.portal.Error.NotFound: Requested setting not found
            MESA-LOADER: failed to retrieve device information
            MESA-LOADER: failed to retrieve device information
            MESA-LOADER: failed to retrieve device information
            MESA-LOADER: failed to open kms_swrast: /usr/lib/dri/kms_swrast_dri.so: cannot open shared object file: Permission denied (search paths /usr/lib/arm-linux-gnueabihf/dri:$${ORIGIN}/dri:/usr/lib/dri)
            failed to load driver: kms_swrast
            MESA-LOADER: failed to open swrast: /usr/lib/dri/swrast_dri.so: cannot open shared object file: Permission denied (search paths /usr/lib/arm-linux-gnueabihf/dri:$${ORIGIN}/dri:/usr/lib/dri)
            failed to load swrast driver

            K 1 Reply Last reply Oct 3, 2023, 9:22 PM Reply Quote 0
            • K Offline
              karsten13 @Freddy_boy
              last edited by Oct 3, 2023, 9:22 PM

              @Freddy_boy

              npm install node-fetch will install the latest version which is a v3.x

              mm does not support typescript and so needs a v2.x version.

              you have to look up the latest v2.x release and install this. This is a problem of MMM-Weather and should be fixed there.

              B F 2 Replies Last reply Oct 3, 2023, 9:28 PM Reply Quote 1
              • B Offline
                BKeyport Module Developer @karsten13
                last edited by Oct 3, 2023, 9:28 PM

                it also looks like the module isn’t supported anymore, at least the original is “Public archive” status - It’s a @bugsounet module, so I’d suggest going over to https://forum.bugsounet.fr/ for support if any is given.

                The "E" in "Javascript" stands for "Easy"

                1 Reply Last reply Reply Quote 0
                • F Offline
                  Freddy_boy @karsten13
                  last edited by Oct 3, 2023, 9:29 PM

                  @karsten13

                  Success! I ran the following command:

                  npm install node-fetch@2

                  … and now it’s back up and running again! Thanks for the quick response!

                  1 Reply Last reply Reply Quote 0
                  • 1 / 1
                  1 / 1
                  • First post
                    2/8
                    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