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-ModuleToggleButton suddenly broken?

    Scheduled Pinned Locked Moved Solved Troubleshooting
    15 Posts 2 Posters 1.2k 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.
    • S Offline
      sdetweil @philie
      last edited by

      @philie can you dump out the postinstall
      file in the module folder…
      it seems to be missing a step

      Sam

      How to add modules

      learning how to use browser developers window for css changes

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

        @philie I see the postinstall script needed an update

        do a
        git pull
        in the module folder
        then
        npm install again

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        P 1 Reply Last reply Reply Quote 0
        • P Offline
          philie @sdetweil
          last edited by

          @sdetweil
          Thank you Sam!
          the edited script did not work for me but the commands worked. so I executed them manually:

          philie@magicmirror:~/MagicMirror $ sudo npm install @electron/rebuild
          
          added 88 packages, and removed 74 packages in 25s
          
          220 packages are looking for funding
            run `npm fund` for details
          philie@magicmirror:~/MagicMirror $ node_modules/.bin/electron-rebuild
          ✔ Rebuild Complete
          philie@magicmirror:~/MagicMirror $
          

          unfortunately the next issue is already on the dorstep:

          message:14:59:24.366] [ERROR] (node:2306) UnhandledPromiseRejectionWarning: Error: The module '/home/philie/MagicMirror/modules/MMM-ModuleToggleButton/node_modules/epoll/build/Release/epoll.node',
          

          So it looks like the thing about epoll is not yet solved…

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

            @philie never use sudo…

            the electron-rebuild command has to be done from inside the module folder(togglebuttons), not the MagicMirror folder

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            P 1 Reply Last reply Reply Quote 0
            • P Offline
              philie @sdetweil
              last edited by

              @sdetweil
              Thank you very much! This did the trick. concerning sudo… it’s sometimes confusing because often I get the message, I do not have enough rights for some commands…

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

                @philie in general for MM there is NEVER a need for sudo… it will cause problems and LATER you will need to user sudo AGAIN…

                the SYSTEM commands may need to use sudo…

                apt update, upgrade, editing files in the /etc folder
                because THOSE are owned by the system and should NOT be editable by a user
                (they are protected on purpose)

                the fact that the postinstall script failed is probably because you did sudo before and now the npm files are owned by root instead of user… (see line 1 above)

                Sam

                How to add modules

                learning how to use browser developers window for css changes

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