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 and MagicMirror v2.18 (and more)

    Scheduled Pinned Locked Moved Development
    40 Posts 16 Posters 24.8k Views 21 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
      susl @bugsounet
      last edited by

      @bugsounet I followed your instructions but the rebuilding step failed with the following message:

      MagicMirror Building module: epoll, Completed: 0gyp: name ‘openssl_fips’ is not defined while evaluating condition ‘openssl_fips != “”’ in binding.gyp while trying to load binding.gyp
      ✖ MagicMirror Rebuild Failed

      An unhandled error occurred inside electron-rebuild
      node-gyp failed to rebuild ‘/home/pi/MagicMirror/modules/MMM-PIR-Sensor/node_modules/epoll’.
      Error: gyp failed with exit code: 1

      Error: node-gyp failed to rebuild ‘/home/pi/MagicMirror/modules/MMM-PIR-Sensor/node_modules/epoll’.
      Error: gyp failed with exit code: 1

      at ModuleRebuilder.rebuildNodeGypModule (/home/pi/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/pi/MagicMirror/modules/MMM-PIR-Sensor/node_modules/magicmirror-rebuild/build/rebuild.js:180:9)
      at async Rebuilder.rebuild (/home/pi/MagicMirror/modules/MMM-PIR-Sensor/node_modules/magicmirror-rebuild/build/rebuild.js:143:17)
      at async /home/pi/MagicMirror/modules/MMM-PIR-Sensor/node_modules/magicmirror-rebuild/build/cli.js:141:9

      Do you know what the problem is? Thanks!

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

        @susl :

        • Recommended version of npm: v6.14.15
        • Recommended version of node: v14.x.x or v16.x.x

        to verify, try this in a terminal (or ssh):

        node -v
        npm -v
        
        S 1 Reply Last reply Reply Quote 0
        • S Offline
          susl @bugsounet
          last edited by

          @bugsounet
          node version: v17.3.0
          npm version: 8.3.0

          So obviously not the correct version :-( Do you know how I can change the versions?

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

            @susl you can use n to install or select different versions of node (and npm)
            to install n
            sudo npm install n -g
            then to install or use a version of node
            n 16

            to switch

            n

            the select from the list

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

              @sdetweil
              Thanks a lot. I works now!

              1 Reply Last reply Reply Quote 0
              • cowboysdudeC Offline
                cowboysdude Module Developer
                last edited by

                @bugsounet Thank you for this!! It works like a charm ;)

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

                  Wow, perfect ! Thank you so much !

                  1 Reply Last reply Reply Quote 0
                  • michael5rM Offline
                    michael5r Module Developer
                    last edited by

                    Thanks for doing this - much appreciated!

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

                      @michael5r with pleasure ;l

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

                        Hi @bugsounet
                        Same problem after update to 2.19 :(

                        During the update, i needed to force because a log say the package-lock.json has been modified. Maybe my error.

                        Trying to reproduce the procedure, but

                        pi@MagicMirror:~/MagicMirror/modules/MMM-PIR-Sensor $ ./node_modules/.bin/MagicMirror-rebuild
                        ⠋ Searching dependency tree
                        An unhandled error occurred inside electron-rebuild
                        Could not detect abi for version 17.2.0 and runtime electron.  Updating "node-abi" might help solve this issue if it is a new release of electron
                        
                        Error: Could not detect abi for version 17.2.0 and runtime electron.  Updating "node-abi" might help solve this issue if it is a new release of electron
                            at Object.getAbi (/home/pi/MagicMirror/modules/MMM-PIR-Sensor/node_modules/node-abi/index.js:39:9)
                            at new Rebuilder (/home/pi/MagicMirror/modules/MMM-PIR-Sensor/node_modules/magicmirror-rebuild/build/rebuild.js:100:48)
                            at rebuildWithOptions (/home/pi/MagicMirror/modules/MMM-PIR-Sensor/node_modules/magicmirror-rebuild/build/rebuild.js:249:23)
                            at doRebuild (/home/pi/MagicMirror/modules/MMM-PIR-Sensor/node_modules/magicmirror-rebuild/build/rebuild.js:272:16)
                            at /home/pi/MagicMirror/modules/MMM-PIR-Sensor/node_modules/magicmirror-rebuild/build/cli.js:115:45
                        pi@MagicMirror:~/MagicMirror/modules/MMM-PIR-Sensor $
                        
                        

                        Did you know how to solve this ?

                        bugsounetB T 2 Replies Last reply Reply Quote 0
                        • bugsounetB Offline
                          bugsounet Banned @selyjohns
                          last edited by bugsounet

                          @selyjohns

                          MMM-PIR-Sensor state is :
                          This repository has been archived by the owner. It is now read-only.

                          I will not doing a patch on every update for this @paviro module

                          Just use another maintened pir module

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

                            @bugsounet said in electron-rebuild and MagicMirror v2.18 (and more):

                            MMM-PIR-Sensor state is :
                            This repository has been archived by the owner. It is now read-only.
                            I will not doing a patch on every update for this @paviro module
                            Just use another maintened pir module

                            Thank you for this quick reply.
                            I see, so no solution for this update…Any idea of equivalent module to replace MMM-PIR-Sensor ?

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

                              @selyjohns I done NO ads in this forum, sorry

                              1 Reply Last reply Reply Quote 0
                              • S selyjohns referenced this topic on
                              • T Offline
                                tanvir586 @selyjohns
                                last edited by

                                @selyjohns
                                hi can you try
                                Cd MagicMirror/modules/MMM-PIR-Sensor
                                And then
                                npm i magicmirror-rebuild
                                Then
                                ./node_modules/.bin/MagicMirror-rebuild

                                It might work.

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

                                  @tanvir586 see
                                  https://forum.magicmirror.builders/topic/16074/electron-rebuild-and-magicmirror-v2-18-and-more/25?_=1648232499740

                                  Sam

                                  How to add modules

                                  learning how to use browser developers window for css changes

                                  S 1 Reply Last reply Reply Quote 0
                                  • S sdetweil referenced this topic on
                                  • S Offline
                                    selyjohns @sdetweil
                                    last edited by

                                    @sdetweil @tanvir586
                                    Yes…Already tested. No fonctionnal

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

                                      @selyjohns correct.

                                      the author of the magicmirror rebuild tool said he will not fix it for this module.

                                      as the module is in archived status

                                      Sam

                                      How to add modules

                                      learning how to use browser developers window for css changes

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

                                        @sdetweil

                                        I generally suggest the same as bugsoutnet…The best way would be to use one of the other PIR modules.
                                        But i also found an solution which worked in my setup. I used the sdetweil script to install the current version of MagicMirror.
                                        In the module directory of MMM-PIR-Sensor you need to delete package-lock.json and the node_modules folder:

                                        rm -rf ~/MagicMirror/modules/MMM-PIR-Sensor/node_modules
                                        rm -rf ~/MagicMirror/modules/MMM-PIR-Sensor/package-lock.json
                                        

                                        Then you need to replace the whole content of package.json file with the following one that uses the MagicMirror-rebuild library of bugsounet…

                                        {
                                          "name": "Magic-Mirror-Module-PIR-Sensor",
                                          "version": "1.1.0",
                                          "description": "PIR motion sensor module for the Magic Mirror.",
                                          "repository": {
                                            "type": "git",
                                            "url": "git+https://github.com/paviro/MMM-PIR-Sensor"
                                          },
                                          "keywords": [
                                            "magic mirror",
                                            "smart mirror",
                                            "PIR-Sensor",
                                            "module",
                                            "motion"
                                          ],
                                          "author": "Paul-Vincent Roll",
                                          "contributors": "https://github.com/paviro/MMM-PIR-Sensor/graphs/contributors",
                                          "license": "MIT",
                                          "bugs": {
                                            "url": "https://github.com/paviro/MMM-PIR-Sensor/issues"
                                          },
                                          "homepage": "https://github.com/paviro/MMM-PIR-Sensor#readme",
                                          "scripts": {
                                        	  "postinstall": "node_modules/.bin/MagicMirror-rebuild"
                                          },
                                          "dependencies": {
                                            "onoff": "latest",
                                            "magicmirror-rebuild": "latest"
                                          }
                                        }
                                        

                                        Then you need to run npm install

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

                                          @wishmaster270 did u try the upgrade script?

                                          it does delete both file and folder and then npm install

                                          Sam

                                          How to add modules

                                          learning how to use browser developers window for css changes

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

                                            @sdetweil Hi, i did a fresh install and added the module manually. I do not use MMM-PIR-Sensor but some other users had the same problem with MMM-Gestures (which i do not use either). Did a clean install of MagicMirror on a development Pi with your script and added modules manually.

                                            1 Reply Last reply Reply Quote 1
                                            • karsten13K karsten13 referenced this topic on
                                            • karsten13K karsten13 referenced this topic on
                                            • O OliWer referenced this topic on

                                            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                            With your input, this post could be even better 💗

                                            Register Login
                                            • 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