Read the statement by Michael Teeuw here.
electron-rebuild and MagicMirror v2.18 (and more)
-
Wow, perfect ! Thank you so much !
-
Thanks for doing this - much appreciated!
-
@michael5r with pleasure ;l
-
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 ?
-
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
-
@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 moduleThank you for this quick reply.
I see, so no solution for this update…Any idea of equivalent module to replace MMM-PIR-Sensor ? -
@selyjohns I done NO ads in this forum, sorry
-
S selyjohns referenced this topic on
-
@selyjohns
hi can you try
Cd MagicMirror/modules/MMM-PIR-Sensor
And then
npm i magicmirror-rebuild
Then
./node_modules/.bin/MagicMirror-rebuildIt might work.
-
-
S sdetweil referenced this topic on
-
@sdetweil @tanvir586
Yes…Already tested. No fonctionnal -
@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
-
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.jsonThen 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 -
@wishmaster270 did u try the upgrade script?
it does delete both file and folder and then npm install
-
@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.
-
K karsten13 referenced this topic on
-
K karsten13 referenced this topic on
-
O OliWer referenced this topic on
-
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.
-
T torte22 referenced this topic on
-
S sdetweil referenced this topic on
-
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 verbwhichfailed Error: not found: python2
npm ERR! gyp verbwhichfailed at getNotFoundError (/home/pi/MagicMirror/modules/MMM-Reddit/node_modules/node-sass/node_modules/which/which.js:13:12)
npm ERR! gyp verbwhichfailed at F (/home/pi/MagicMirror/modules/MMM-Reddit/node_modules/node-sass/node_modules/which/which.js:68:19)
npm ERR! gyp verbwhichfailed at E (/home/pi/MagicMirror/modules/MMM-Reddit/node_modules/node-sass/node_modules/which/which.js:80:29)
npm ERR! gyp verbwhichfailed at /home/pi/MagicMirror/modules/MMM-Reddit/node_modules/node-sass/node_modules/which/which.js:89:16
npm ERR! gyp verbwhichfailed at /home/pi/MagicMirror/modules/MMM-Reddit/node_modules/isexe/index.js:42:5
npm ERR! gyp verbwhichfailed at /home/pi/MagicMirror/modules/MMM-Reddit/node_modules/isexe/mode.js:8:5
npm ERR! gyp verbwhichfailed at FSReqCallback.oncomplete (node:fs:206:21)
npm ERR! gyp verbwhichfailed python2 Error: not found: python2
npm ERR! gyp verbwhichfailed at getNotFoundError (/home/pi/MagicMirror/modules/MMM-Reddit/node_modules/node-sass/node_modules/which/which.js:13:12)
npm ERR! gyp verbwhichfailed at F (/home/pi/MagicMirror/modules/MMM-Reddit/node_modules/node-sass/node_modules/which/which.js:68:19)
npm ERR! gyp verbwhichfailed at E (/home/pi/MagicMirror/modules/MMM-Reddit/node_modules/node-sass/node_modules/which/which.js:80:29)
npm ERR! gyp verbwhichfailed at /home/pi/MagicMirror/modules/MMM-Reddit/node_modules/node-sass/node_modules/which/which.js:89:16
npm ERR! gyp verbwhichfailed at /home/pi/MagicMirror/modules/MMM-Reddit/node_modules/isexe/index.js:42:5
npm ERR! gyp verbwhichfailed at /home/pi/MagicMirror/modules/MMM-Reddit/node_modules/isexe/mode.js:8:5
npm ERR! gyp verbwhichfailed at FSReqCallback.oncomplete (node:fs:206:21) {
npm ERR! gyp verbwhichfailed code: ‘ENOENT’
npm ERR! gyp verbwhichfailed }
npm ERR! gyp verb check python checking for Python executable “python” in the PATH
npm ERR! gyp verbwhichsucceeded 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: 1npm 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 -
@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: python2looks like u don’t have python version 2 installed
do python -v
-
@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!
-
@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 runnpm i magicmirror-rebuildevery time in each module folder? -
@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. -
L Lusbueb 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