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

Scheduled Pinned Locked Moved Development
40 Posts 16 Posters 20.5k 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.
  • W Offline
    wishmaster270 Module Developer @sdetweil
    last edited by Apr 3, 2022, 4:31 PM

    @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
    • K karsten13 referenced this topic on Apr 7, 2022, 4:37 PM
    • K karsten13 referenced this topic on Apr 7, 2022, 6:20 PM
    • O OliWer referenced this topic on Apr 8, 2022, 6:32 AM
    • R Offline
      Rags
      last edited by May 1, 2022, 3:59 AM

      Awesome. It really works. I had the same issue and it was really frustrating, until i stumbled upon this solution. Great my PIR-sensor module was revived. I just followed the steps mentioned and voila…it has come back to life. Thanks a ton, it is selfless gentlemen like yourself who keep this world going. Kudos.

      1 Reply Last reply Reply Quote 1
      • T torte22 referenced this topic on Jul 10, 2022, 11:55 AM
      • S sdetweil referenced this topic on Aug 6, 2022, 12:07 PM
      • D Offline
        Dresch360 Project Sponsor
        last edited by Oct 7, 2022, 3:03 AM

        Hoping someone can help. Having the same issue with MMM-Reddit since updating to MM v2.20.0 . Spent a couple days scouring this as well as other forums for a fix. I already tried everything from this thread. Still getting the error below, no matter what I try. Any help would be greatly appreciated.

        • MM v2.20.0
        • Node v16.17.1
          -Node-gyp v9.2.0
          -NPM v8.15.0

        This is the code I get for any rebuild or npm install…etc:

        npm ERR! code 1
        npm ERR! path /home/pi/MagicMirror/modules/MMM-Reddit/node_modules/node-sass
        npm ERR! command failed
        npm ERR! command sh /tmp/postinstall-fdc6f405.sh
        npm ERR! Building: /usr/bin/node /home/pi/MagicMirror/modules/MMM-Reddit/node_modules/node-sass/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
        npm ERR! gyp info it worked if it ends with ok
        npm ERR! gyp verb cli [
        npm ERR! gyp verb cli ‘/usr/bin/node’,
        npm ERR! gyp verb cli ‘/home/pi/MagicMirror/modules/MMM-Reddit/node_modules/node-sass/node_modules/node-gyp/bin/node-gyp.js’,
        npm ERR! gyp verb cli ‘rebuild’,
        npm ERR! gyp verb cli ‘–verbose’,
        npm ERR! gyp verb cli ‘–libsass_ext=’,
        npm ERR! gyp verb cli ‘–libsass_cflags=’,
        npm ERR! gyp verb cli ‘–libsass_ldflags=’,
        npm ERR! gyp verb cli ‘–libsass_library=’
        npm ERR! gyp verb cli ]
        npm ERR! gyp info using node-gyp@3.8.0
        npm ERR! gyp info using node@16.17.1 | linux | arm
        npm ERR! gyp verb command rebuild []
        npm ERR! gyp verb command clean []
        npm ERR! gyp verb clean removing “build” directory
        npm ERR! gyp verb command configure []
        npm ERR! gyp verb check python checking for Python executable “python2” in the PATH
        npm ERR! gyp verb which failed Error: not found: python2
        npm ERR! gyp verb which failed at getNotFoundError (/home/pi/MagicMirror/modules/MMM-Reddit/node_modules/node-sass/node_modules/which/which.js:13:12)
        npm ERR! gyp verb which failed at F (/home/pi/MagicMirror/modules/MMM-Reddit/node_modules/node-sass/node_modules/which/which.js:68:19)
        npm ERR! gyp verb which failed at E (/home/pi/MagicMirror/modules/MMM-Reddit/node_modules/node-sass/node_modules/which/which.js:80:29)
        npm ERR! gyp verb which failed at /home/pi/MagicMirror/modules/MMM-Reddit/node_modules/node-sass/node_modules/which/which.js:89:16
        npm ERR! gyp verb which failed at /home/pi/MagicMirror/modules/MMM-Reddit/node_modules/isexe/index.js:42:5
        npm ERR! gyp verb which failed at /home/pi/MagicMirror/modules/MMM-Reddit/node_modules/isexe/mode.js:8:5
        npm ERR! gyp verb which failed at FSReqCallback.oncomplete (node:fs:206:21)
        npm ERR! gyp verb which failed python2 Error: not found: python2
        npm ERR! gyp verb which failed at getNotFoundError (/home/pi/MagicMirror/modules/MMM-Reddit/node_modules/node-sass/node_modules/which/which.js:13:12)
        npm ERR! gyp verb which failed at F (/home/pi/MagicMirror/modules/MMM-Reddit/node_modules/node-sass/node_modules/which/which.js:68:19)
        npm ERR! gyp verb which failed at E (/home/pi/MagicMirror/modules/MMM-Reddit/node_modules/node-sass/node_modules/which/which.js:80:29)
        npm ERR! gyp verb which failed at /home/pi/MagicMirror/modules/MMM-Reddit/node_modules/node-sass/node_modules/which/which.js:89:16
        npm ERR! gyp verb which failed at /home/pi/MagicMirror/modules/MMM-Reddit/node_modules/isexe/index.js:42:5
        npm ERR! gyp verb which failed at /home/pi/MagicMirror/modules/MMM-Reddit/node_modules/isexe/mode.js:8:5
        npm ERR! gyp verb which failed at FSReqCallback.oncomplete (node:fs:206:21) {
        npm ERR! gyp verb which failed code: ‘ENOENT’
        npm ERR! gyp verb which failed }
        npm ERR! gyp verb check python checking for Python executable “python” in the PATH
        npm ERR! gyp verb which succeeded python /usr/bin/python
        npm ERR! gyp ERR! configure error
        npm ERR! gyp ERR! stack Error: Command failed: /usr/bin/python -c import sys; print “%s.%s.%s” % sys.version_info[:3];
        npm ERR! gyp ERR! stack File “”, line 1
        npm ERR! gyp ERR! stack import sys; print “%s.%s.%s” % sys.version_info[:3];
        npm ERR! gyp ERR! stack ^
        npm ERR! gyp ERR! stack SyntaxError: invalid syntax
        npm ERR! gyp ERR! stack
        npm ERR! gyp ERR! stack at ChildProcess.exithandler (node:child_process:400:12)
        npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:513:28)
        npm ERR! gyp ERR! stack at maybeClose (node:internal/child_process:1093:16)
        npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
        npm ERR! gyp ERR! System Linux 5.15.61-v7l+
        npm ERR! gyp ERR! command “/usr/bin/node” “/home/pi/MagicMirror/modules/MMM-Reddit/node_modules/node-sass/node_modules/node-gyp/bin/node-gyp.js” “rebuild” “–verbose” “–libsass_ext=” “–libsass_cflags=” “–libsass_ldflags=” “–libsass_library=”
        npm ERR! gyp ERR! cwd /home/pi/MagicMirror/modules/MMM-Reddit/node_modules/node-sass
        npm ERR! gyp ERR! node -v v16.17.1
        npm ERR! gyp ERR! node-gyp -v v3.8.0
        npm ERR! gyp ERR! not ok
        npm ERR! Build failed with error code: 1

        npm ERR! A complete log of this run can be found in:
        npm ERR! /home/pi/.npm/_logs/2022-10-07T02_52_13_196Z-debug-0.log

        S 1 Reply Last reply Oct 7, 2022, 11:48 AM Reply Quote 0
        • S Offline
          sdetweil @Dresch360
          last edited by sdetweil Oct 9, 2022, 2:06 AM Oct 7, 2022, 11:48 AM

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

          Python executable “python2” in the PATH
          npm ERR! gyp verb which failed Error: not found: python2

          looks like u don’t have python version 2 installed

          do python -v

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          D 1 Reply Last reply Oct 9, 2022, 1:55 AM Reply Quote 0
          • D Offline
            Dresch360 Project Sponsor @sdetweil
            last edited by Oct 9, 2022, 1:55 AM

            @sdetweil Thanks Sam! Ughh…I feel pretty silly that I didn’t realize that. Was looking at the least obvious issue. Works perfectly after installing Python 2. Thanks again!

            1 Reply Last reply Reply Quote 0
            • L Offline
              Lusbueb @bugsounet
              last edited by Jul 8, 2023, 7:20 PM

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

              npm i magicmirror-rebuild

              Thank you very much :-)

              it works for me with another module “MMM-Buttons”, I’m so happy!
              do you have to run npm i magicmirror-rebuild every time in each module folder?

              M 1 Reply Last reply Jul 8, 2023, 8:10 PM Reply Quote 1
              • M Offline
                MMRIZE @Lusbueb
                last edited by MMRIZE Jul 8, 2023, 8:11 PM Jul 8, 2023, 8:10 PM

                @Lusbueb
                Usually, No.
                Only the magic mirror module which use “native node module” needs it. but it would be hard to distinguish by a normal user.

                1 Reply Last reply Reply Quote 1
                • L Lusbueb referenced this topic on Jul 9, 2023, 9:19 AM
                • 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