Read the statement by Michael Teeuw here.
electron-rebuild and MagicMirror v2.18 (and more)
-
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
-
-
@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.
-
-
-
@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.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
-
@wishmaster270 did u try the upgrade script?
it does delete both file and folder and then npm install