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

electron-rebuild problems with MagicMirror 2.22.0

Scheduled Pinned Locked Moved Solved Troubleshooting
53 Posts 5 Posters 13.5k 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.
  • S Away
    sdetweil @wishmaster270
    last edited by Jan 7, 2023, 1:34 PM

    @wishmaster270 cool. thx for feedback

    don’t know Teleframe.

    Sam

    How to add modules

    learning how to use browser developers window for css changes

    K 1 Reply Last reply Jan 7, 2023, 3:05 PM Reply Quote 0
    • K Offline
      KristjanESPERANTO Module Developer @sdetweil
      last edited by KristjanESPERANTO Jan 7, 2023, 3:26 PM Jan 7, 2023, 3:05 PM

      The problems on my machine are obviously of a different nature. I’ll investigate that later.

      For the original issue it should be worth using @electron/rebuild instead of magicmirror-rebuild or electron-rebuild. I tested it in a virtual machine and it works great. Here is my solution which is less invasive:
      https://github.com/Tom-Hirschberger/MMM-GPIO-Notifications/pull/7

      What do you think?

      S W 2 Replies Last reply Jan 7, 2023, 3:11 PM Reply Quote 0
      • S Away
        sdetweil @KristjanESPERANTO
        last edited by Jan 7, 2023, 3:11 PM

        @KristjanESPERANTO my postinstall script uses electron-rebuild

        his development branch

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        K 1 Reply Last reply Jan 7, 2023, 3:18 PM Reply Quote 0
        • K Offline
          KristjanESPERANTO Module Developer @sdetweil
          last edited by KristjanESPERANTO Jan 7, 2023, 3:19 PM Jan 7, 2023, 3:18 PM

          Yes, but @electron/rebuild is the successor of electron-rebuild. And the “trick” in the postinstall script seems not necessary at all.

          S 1 Reply Last reply Jan 7, 2023, 3:38 PM Reply Quote 0
          • W Offline
            wishmaster270 Module Developer @KristjanESPERANTO
            last edited by Jan 7, 2023, 3:19 PM

            @KristjanESPERANTO

            Hi and thank you for contributing. I confirm that changing to magicmirror-rebuild did not make things batter but worse. I now followed the suggestion of @sdetweil and implemented his postinstall script. Things are working perfectly now and should work in future releases, too.

            I merged the new changes to the master a few minutes ago and released version 0.0.7 of MMM-GPIO-Notifications. I will implement this approach in my other modules, too.

            K 1 Reply Last reply Jan 7, 2023, 3:24 PM Reply Quote 0
            • K Offline
              KristjanESPERANTO Module Developer @wishmaster270
              last edited by KristjanESPERANTO Jan 7, 2023, 3:34 PM Jan 7, 2023, 3:24 PM

              @wishmaster270 OK, you’re welcome.

              Since the thread is also for other developers: I recommend considering my approach, as I consider the other approach (installing to a higher-level directory) to be more error-prone. But it’s a creative workaround.

              W 1 Reply Last reply Jan 7, 2023, 3:28 PM Reply Quote 0
              • W Offline
                wishmaster270 Module Developer @KristjanESPERANTO
                last edited by wishmaster270 Jan 7, 2023, 3:28 PM Jan 7, 2023, 3:28 PM

                @KristjanESPERANTO
                The problem with installing it in the module directory is that we need to compile the library against the electron version installed in the MagicMirror project.
                If electron-rebuild is installed in the module directory it might fail to detect the right electron version (which was the cause of the rebuild problems in the past).
                So the right way is to install electron-rebuild in the same project as electron and call it from there.

                It might be worth to think about adding it as a dependency in the main project.

                K K 2 Replies Last reply Jan 7, 2023, 3:33 PM Reply Quote 1
                • K Offline
                  KristjanESPERANTO Module Developer @wishmaster270
                  last edited by KristjanESPERANTO Jan 7, 2023, 3:37 PM Jan 7, 2023, 3:33 PM

                  @wishmaster270 Okay, thanks for the explanation! I haven’t been able to read that anywhere in such clear words and I haven’t dealt with the past problems. Then I withdraw my recommendation because I lack the overview.

                  1 Reply Last reply Reply Quote 0
                  • S Away
                    sdetweil @KristjanESPERANTO
                    last edited by Jan 7, 2023, 3:38 PM

                    @KristjanESPERANTO ah I see

                    haven’t heard of @electron/rebuild

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    1 Reply Last reply Reply Quote 0
                    • K Offline
                      karsten13 @wishmaster270
                      last edited by Jan 7, 2023, 3:41 PM

                      @wishmaster270 said in electron-rebuild problems with MagicMirror 2.22.0:

                      So the right way is to install electron-rebuild in the same project as electron and call it from there.

                      installing module stuff in the node_modules folder of mm is a hack and will not work out of the box with a docker setup because this folder is only in the container (you have to map it on the host to get changes there persistent)

                      It might be worth to think about adding it as a dependency in the main project.

                      in this case may the best solution

                      S 2 Replies Last reply Jan 7, 2023, 3:43 PM Reply Quote 0
                      • 1
                      • 2
                      • 3
                      • 4
                      • 5
                      • 6
                      • 4 / 6
                      4 / 6
                      • First post
                        31/53
                        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