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.

    Default Weather module still not displaying

    Scheduled Pinned Locked Moved Solved Troubleshooting
    39 Posts 6 Posters 13.0k Views 6 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.
    • B Offline
      Blackeye @Blackeye
      last edited by

      @sdetweil And this is the final part of the error message, in bright red:

       at ModuleRebuilder.rebuildNodeGypModule (/home/<myusername>/MagicMirror/modules/MMM-PIR-Sensor                                     /node_modules/magicmirror-rebuild/build/module-rebuilder.js:193:19)
          at processTicksAndRejections (node:internal/process/task_queues:96:5)
          at async Rebuilder.rebuildModuleAt (/home/<myusername>/MagicMirror/modules/MMM-PIR-Sensor/node                                     _modules/magicmirror-rebuild/build/rebuild.js:180:9)
          at async Rebuilder.rebuild (/home/<myusername>/MagicMirror/modules/MMM-PIR-Sensor/node_modules                                     /magicmirror-rebuild/build/rebuild.js:143:17)
          at async /home/<myusername>/MagicMirror/modules/MMM-PIR-Sensor/node_modules/magicmirror-rebuil                                     d/build/cli.js:141:9
      
      
      S 2 Replies Last reply Reply Quote 0
      • S Offline
        sdetweil @Blackeye
        last edited by

        @Blackeye hm. 1st time I’ve seen his tools fail…

        @bugsounet any guidance

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        bugsounetB 1 Reply Last reply Reply Quote 0
        • bugsounetB Offline
          bugsounet Banned @sdetweil
          last edited by bugsounet

          @sdetweil yes

          epoll/20.0.1 means it uses electron v20.0.1 for MagicMirror instead of v19.x that why it crash.

          I’ll leave it up to you to explain it :)

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

            @Blackeye ok, heres a way around the problem

            fix MM install to have one new tool

            cd ~/MagicMirror
            npm install electron-rebuild
            

            fix MMM-PIR-Sensor

            cd ~/MagicMirror/modules/MMM-PIR-Sensor
            nano package.json 
            

            scroll down to

              "scripts": {
                "postinstall": "node_modules/.bin/electron-rebuild -e ../../node_modules/electron"
              },
            

            change the postinstall line so it looks like this

              "scripts": {
                "postinstall": "~/MagicMirror/node_modules/.bin/electron-rebuild -e ../../node_modules/electron"
              },
            

            ctrl-o to save the updated package.json
            ctrl-x to exit the editor

            then

            npm install
            

            should work correctly now

            I just tested this on my MM 2.20 version, on both my linux machine and my pi4 with bullseye

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            B 1 Reply Last reply Reply Quote 0
            • B Offline
              Blackeye @sdetweil
              last edited by Blackeye

              @sdetweil said in Default Weather module still not displaying:

              ~/MagicMirror/node_modules/.bin/electron-rebuild -e …/…/node_modules/electron

              Yes! It installed correctly this time, so that change in the path did the trick. I did get some warnings however:

              npm WARN deprecated har-validator@5.1.5: this library is no longer supported
              npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain cir                                 cumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
              npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
              

              So it is not quite a perfect solution, but it works!
              Many thanks for the suggestions and the solution!

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

                @Blackeye ignore the warnings, nothing we can do about them.

                the ‘problem’ here is that the compiler needs to know what version of electron to build for, but can’t figure it out.

                using electron-rebuild from the mm libs solves that

                Sam

                How to add modules

                learning how to use browser developers window for css changes

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