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 18.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.
    • karsten13K Offline
      karsten13 @wishmaster270
      last edited by

      @wishmaster270

      o.k., but where are the compile results stored?

      wishmaster270W 1 Reply Last reply Reply Quote 0
      • wishmaster270W Offline
        wishmaster270 Module Developer @karsten13
        last edited by wishmaster270

        @karsten13
        They are stored in the node_modules folder of the module which should be persistent

        Edit: Do not misunderstand me. In my opinion the best way to solve the electron-rebuild problems of a lot of modules would be to put “@electron/rebuild” as a dependency to “package.json” of MagicMirror.

        karsten13K 2 Replies Last reply Reply Quote 0
        • karsten13K Offline
          karsten13 @wishmaster270
          last edited by

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

          @karsten13
          They are stored in the node_modules folder of the module which should be persistent

          thats good, so the construction with installing electron-rebuild in mm folder has no side effects and works also in a docker setup.

          1 Reply Last reply Reply Quote 0
          • karsten13K Offline
            karsten13 @wishmaster270
            last edited by

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

            Edit: Do not misunderstand me. In my opinion the best way to solve the electron-rebuild problems of a lot of modules would be to put “@electron/rebuild” as a dependency to “package.json” of MagicMirror.

            I don’t have a final opinion on that yet, but if so, we should put it under optionalDependencies as electron

            wishmaster270W S 2 Replies Last reply Reply Quote 1
            • wishmaster270W Offline
              wishmaster270 Module Developer @karsten13
              last edited by

              @karsten13

              You are right. I think optionalDependencies would be a great solution. Module developers could then add a hint to run npm ci in the MagicMirror directory to their installations instructions.

              As the container it self is untouched it should be no problem. It only causes @electron/rebuild to be installed the next time the script is called.

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

                @KristjanESPERANTO but if u look at electron/rebuild after install u call electron-rebuild

                still has to be installed in the base node_modules folder…

                older unmaintained modules are broken either way. why I had to fork MMM-Buttons.

                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 @wishmaster270
                  last edited by

                  @wishmaster270 optional is there so that IF electron is NOT installed, the install does not fail (needed on pi0w at least)
                  have nothing to do w ci

                  my script ONLY installs prod, no dev. as 99.5% of users are users not mm developers. has nothing to do w module developers

                  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 @karsten13
                    last edited by

                    @karsten13 and the postinstall checks for it being there, and if so skips the e-r install.

                    doesn’t know/care HOW it got installed before

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    karsten13K 1 Reply Last reply Reply Quote 0
                    • karsten13K Offline
                      karsten13 @sdetweil
                      last edited by

                      @sdetweil

                      you can use --omit=optional as param for npm install, I use this for my amd64 images because they are run to 99,9% with npm run server so electron is not needed

                      T 1 Reply Last reply Reply Quote 1
                      • T Offline
                        thobach @karsten13
                        last edited by

                        @karsten13 What are your thoughts on adding npm install @electron/rebuild --unsafe-perm; \ as part of the container image creation process to https://gitlab.com/khassel/magicmirror/-/blob/master/build/Dockerfile-debian?

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