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.

    MMM-InternetMonitor

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    18 Posts 4 Posters 6.0k 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.
    • R Offline
      Richtw @bhepler
      last edited by

      @bhepler
      Hi - I am looking to replace my last mirror build with an updated one.

      this module is throwing an error on my install. I suspect I must have gone astray in the install?
      I started out with a clean install of raspbian and magic mirror
      Started it up with the default settings and it seems to work fine

      This was the first module I added

      Commands I issued were:

      • cd MagicMirror/modules

      • git clone https://github.com/BrianHepler/internet-monitor.git

      • cd internet-monitor
        NPM install showed some warnings:

        added 191 packages, and audited 192 packages in 3m
        9 packages are looking for funding
        run npm fund for details
        3 moderate severity vulnerabilities
        To address all issues (including breaking changes), run:
        npm audit fix --force
        Run npm audit for details.

      When I NPM start now it throws an error:

      	[22.01.2023 15:19.07.139] [ERROR] WARNING! Could not load config file. Starting with default configuration. Error 				found: Error: Cannot find module '/home/richard/MagicMirror/modules/internet-monitor/node_modules/lzma-native/			binding-v4.0.6-electron-v22.0-linux-arm64/lzma_native.node'
      	Require stack:
      	- /home/richard/MagicMirror/modules/internet-monitor/node_modules/lzma-native/index.js
      	- /home/richard/MagicMirror/modules/internet-monitor/node_modules/decompress-tarxz/index.js
      	- /home/richard/MagicMirror/modules/internet-monitor/node_modules/speedtest-net/index.js
      	- /home/richard/MagicMirror/modules/internet-monitor/node_helper.js
      	- /home/richard/MagicMirror/js/app.js
      	- /home/richard/MagicMirror/js/electron.js
      	- /home/richard/MagicMirror/node_modules/electron/dist/resources/default_app.asar/main.js
      
      S bheplerB 3 Replies Last reply Reply Quote 0
      • S Offline
        sdetweil @Richtw
        last edited by

        @Richtw the error is about 20 lines closer to the top

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        1 Reply Last reply Reply Quote 0
        • S Offline
          sdetweil @Richtw
          last edited by sdetweil

          @Richtw said in MMM-InternetMonitor:

          binding-v4.0.6-electron-v22.0-linux-arm64/lzma_native.node

          looks like not built for arm and electron 22…

          so, you could try this
          create a file in the module home folder

          cd ~/MagicMirror/modules/internet-monitor
          touch buildit
          

          then nano buildit, and paste this into the editor

          #!/bin/bash
          
          if [ ! -f ../../node_modules/.bin/electron-rebuild ]; then
          	cd ../..
          	npm install electron-rebuild >/dev/null 2>&1
          	cd -
          fi 
          ../../node_modules/.bin/electron-rebuild
          

          ctrl-o to save, ctrl-x to exit

          chmod +x buildit
          

          then ./buildit

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          1 Reply Last reply Reply Quote 0
          • bheplerB Offline
            bhepler Module Developer @Richtw
            last edited by bhepler

            @Richtw - Yeah, that error usually means that there is an error in your config.js file.

            Couple suggestions:

            1. Try this out in the MagicMirror folder: npm run config:check. It will let you know if there are any errors in your config.js file.
            2. Post the relevant section of your config.js file in this thread. Be sure to use the markdown features of the forum for readability.

            [Dammit, I am about this close to just deleting my repository. It’s not my module and I’m sick of fixing it.]

            R 1 Reply Last reply Reply Quote 0
            • R Offline
              Richtw @bhepler
              last edited by

              @bhepler
              thanks everyone for all the suggestions. Still stuck:
              For the suggestion - @Richtw the error is about 20 lines closer to the top - Here’s the top
              richard@raspberrypi:~/MagicMirror/config $ npm start

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

              [24.01.2023 17:51.15.999] [LOG] Starting MagicMirror: v2.22.0
              [24.01.2023 17:51.16.006] [LOG] Loading config …
              [24.01.2023 17:51.16.014] [LOG] Loading module helpers …
              [24.01.2023 17:51.16.017] [LOG] No helper found for module: alert.
              [24.01.2023 17:51.16.053] [LOG] Initializing new module helper …
              [24.01.2023 17:51.16.054] [LOG] Module helper loaded: updatenotification
              [24.01.2023 17:51.16.056] [LOG] No helper found for module: clock.
              [24.01.2023 17:51.16.534] [LOG] Initializing new module helper …
              [24.01.2023 17:51.16.535] [LOG] Module helper loaded: calendar
              [24.01.2023 17:51.17.618] [ERROR] WARNING! Could not load config file. Starting with default configuration. Error found: Error: Cannot find module ‘/home/richard/MagicMirror/modules/internet-monitor/node_modules/lzma-native/binding-v4.0.6-electron-v22.0-linux-arm64/lzma_native.node’

              For the suggestion - npm run config:check. I ran it and it did not find anything
              Your configuration file doesn’t contain syntax errors :)

              Here’s my config file

              {
                                      module: 'internet-monitor',
                                      position: 'upper_third',
                                      header: 'Internet Monitor',
                                      config:{
                                              type: '',
                                              maxTime: 20000,
                                              updateInterval: 30000,
                                              verbose: false,
                                              displayStrength: true,
                                              displaySpeed: true,
                                              strengthIconSize: 80,
                                              maxGuageScale: 1000,
                                      }
                              },
              

              I tried that buildit script but it kicked back with:
              ./buildit: line 8: …/…/node_modules/.bin/electron-rebuild: Permission denied

              Running with sudo gave same result

              S 1 Reply Last reply Reply Quote 0
              • S Offline
                sdetweil @Richtw
                last edited by

                @Richtw can you show results of

                ls ~/MagicMirror/node_modules/.bin/electron-rebuild -laF
                

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                R 1 Reply Last reply Reply Quote 0
                • R Offline
                  Richtw @sdetweil
                  last edited by

                  @sdetweil said in MMM-InternetMonitor:

                  ls ~/MagicMirror/node_modules/.bin/electron-rebuild -laF

                  thanks for the reply!

                  richard@raspberrypi:~/MagicMirror $ ls ~/MagicMirror/node_modules/.bin/electron-rebuild -laF
                  lrwxrwxrwx 1 richard richard 34 Jan 24 17:57 /home/richard/MagicMirror/node_modules/.bin/electron-rebuild -> ../electron-rebuild/lib/src/cli.js
                  
                  S 1 Reply Last reply Reply Quote 0
                  • S Offline
                    sdetweil @Richtw
                    last edited by

                    @Richtw weird.

                    edit the buildit script we wrote and add

                    -b
                    

                    at end of the last line, w a space before it. see if we can find where it is have permissions error

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    R 1 Reply Last reply Reply Quote 0
                    • R Offline
                      Richtw @sdetweil
                      last edited by

                      @sdetweil Here’s the script I’m running

                      !/bin/bash
                      
                      if [ ! -f ../../node_modules/.bin/electron-rebuild ]; then
                              cd ../..
                              npm install electron-rebuild >/dev/null 2>&1
                              cd -
                      fi
                      ../../node_modules/.bin/electron-rebuild -b
                      

                      Here’s the result

                      richard@raspberrypi:~/MagicMirror/modules/internet-monitor $ sudo ./buildit
                      ./buildit: line 8: ../../node_modules/.bin/electron-rebuild: Permission denied
                      
                      S 1 Reply Last reply Reply Quote 0
                      • S Offline
                        sdetweil @Richtw
                        last edited by

                        @Richtw sorry. I do not understand the problem jetey, and cannot reproduce it on my own

                        Sam

                        How to add modules

                        learning how to use browser developers window for css changes

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