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.

    Any module other than default breaks my mirror

    Scheduled Pinned Locked Moved Solved Troubleshooting
    4 Posts 2 Posters 417 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.
    • R Offline
      Rhosybol
      last edited by

      When I install a module I get an issue with the mirror not working and get errors like below - I don’t understand it sufficiently well enough to understand how to resolve the problem: any help greatly appreciated thanks

      raspberry@raspberry:~ $ npm run config:check
      npm ERR! code ENOENT
      npm ERR! syscall open
      npm ERR! path /home/raspberry/package.json
      npm ERR! errno -2
      npm ERR! enoent ENOENT: no such file or directory, open ‘/home/raspberry/package.json’
      npm ERR! enoent This is related to npm not being able to find a file.
      npm ERR! enoent

      npm ERR! A complete log of this run can be found in:
      npm ERR! /home/raspberry/.npm/_logs/2023-08-27T20_27_49_271Z-debug.log
      raspberry@raspberry:~ $ ^C

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

        @Rhosybol have to be IN the MagicMirror folder for those commands

        cd ~/MagicMirror
        npm run config:check
        

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        R 2 Replies Last reply Reply Quote 0
        • R Offline
          Rhosybol @sdetweil
          last edited by

          @sdetweil Hi, thanks so much for your lightning wuick reply - that resolved my issue on my virtual machine but I think masked another issue on my Pi 3B - as before I installed MMM-SORT and checked the config file - all good however when I run npm start dev now I get the following - I should say I’ve tried rebuilding my pi several times over the last few days to try and get to the bottom of it and it is only when I add a module that the mirror stops working (despite run config:check not coming back with any errors)… I have built several in the past and never had this issue adding modules before - I have no idea what’s happening…

          raspberry@raspberrypi:~/MagicMirror $ npm start dev

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

          [28.08.2023 07:50.46.062] [LOG] Starting MagicMirror: v2.24.0
          [28.08.2023 07:50.46.075] [LOG] Loading config …
          [28.08.2023 07:50.46.081] [DEBUG] config template file not exists, no envsubst
          [28.08.2023 07:50.46.091] [LOG] Loading module helpers …
          [28.08.2023 07:50.46.094] [LOG] No helper found for module: alert.
          [28.08.2023 07:50.46.115] [ERROR] (node:1863) UnhandledPromiseRejectionWarning: Error: Cannot find module ‘request’
          Require stack:

          • /home/raspberry/MagicMirror/modules/MMM-SORT/node_helper.js
          • /home/raspberry/MagicMirror/js/app.js
          • /home/raspberry/MagicMirror/js/electron.js
          • /home/raspberry/MagicMirror/node_modules/electron/dist/resources/default_app.asar/main.js
          • at Module._resolveFilename (node:internal/modules/cjs/loader:1082:15)
            at n._resolveFilename (node:electron/js2c/browser_init:2:117469)
            at Module._resolveFilename (/home/raspberry/MagicMirror/node_modules/module-alias/index.js:49:29)
            at Module._load (node:internal/modules/cjs/loader:927:27)
            at f._load (node:electron/js2c/asar_bundle:2:13330)
            at Module.require (node:internal/modules/cjs/loader:1148:19)
            at require (node:internal/modules/cjs/helpers:110:18)
            at Object. (/home/raspberry/MagicMirror/modules/MMM-SORT/node_helper.js:8:17)
            at Module._compile (node:internal/modules/cjs/loader:1269:14)
            at Module._extensions…js (node:internal/modules/cjs/loader:1324:10)
            at Module.load (node:internal/modules/cjs/loader:1124:32)
            at Module._load (node:internal/modules/cjs/loader:965:12)
            at f._load (node:electron/js2c/asar_bundle:2:13330)
            at Module.require (node:internal/modules/cjs/loader:1148:19)
            at require (node:internal/modules/cjs/helpers:110:18)
            at loadModule (/home/raspberry/MagicMirror/js/app.js:180:19)
            (Use electron --trace-warnings ... to show where the warning was created)
            [28.08.2023 07:50.46.116] [ERROR] (node:1863) 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)
            MESA-LOADER: failed to retrieve device information
            MESA-LOADER: failed to retrieve device information
            MESA-LOADER: failed to retrieve device information
          1 Reply Last reply Reply Quote 0
          • R Offline
            Rhosybol @sdetweil
            last edited by

            @sdetweil I was reading some other issues similar to mine and I ran npm install request in the MMM-SORT module and after 20 minutes it had finished - I rebooted and everything came up working as I needed it to be - thanks for your help - very much appreciated!

            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