Read the statement by Michael Teeuw here.
electron-rebuild and MagicMirror v2.18 (and more)
-
Wow, thanks for sharing this!!!
Now, I’m back on track again :-) -
@bugsounet Thanks for this lib. Integrated it into two of my modules yesterday because I couldn’t get them compiled with electron-rebuild.
-
If it can help, it’s perfect ;)
I have do the same too for rebuild modulesbut don’t forget to delete
"electron-rebuild": "v.xxx",
from for package.json file ;)
because this old package is not needed now -
@hedmik : i just share (one of) my own library ;)
-
@bugsounet thank you very much, for weeks I am looking for a solution to finally be able to add an essential function to the mirror :thumbs_up:
-
@bugsounet THANK YOU! This saved me a lot of headaches. I went ahead and updated to 2.18 and got the exact error you reference in the exact same module. A quick search and I found your very helpful solution. Thank you for sharing.
-
I get an error when " ~/node_modules $ ~/.bin/MagicMirror-rebuild"
error=(an unhandled error occurred inside electron-rebuild)
unable to find electron’s version number of MagicMirror etc -
@lhops
Can or has anyone written code for an new MMM-PIR-Sensor module that will work will the new version of MagicMirror. If not is that something that your can do? I wish I knew more about the code I would do it myself. -
@lhops said in electron-rebuild and MagicMirror v2.18 (and more):
I get an error when " ~/node_modules $ ~/.bin/MagicMirror-rebuild"
execute
./node_modules/.bin/MagicMirror-rebuild
INSIDE the module directory ;)not inside other directory ;)
Note :- every module in MagicMirror is there:
cd ~/MagicMirror/modules
- After change again the directory to your wanted module,
forMMM-PIR-Sensor
module (for example):
cd MMM-PIR-Sensor
- after install
magicmirror-rebuild
npm i magicmirror-rebuild
- execute
MagicMirror-rebuild
program
./node_modules/.bin/MagicMirror-rebuild
-
you will see
MagicMirror Rebuild Complete
-
it’s done ;)
-
@bugsounet
This is the results of the instructions:pi@raspberrypi:~/MagicMirror/modules/MMM-PIR-Sensor $ npm i magicmirror-rebuild
npm ERR! code EJSONPARSE
npm ERR! path /home/pi/MagicMirror/modules/MMM-PIR-Sensor/package.json
npm ERR! JSON.parse Unexpected string in JSON at position 803 while parsing ‘{
npm ERR! JSON.parse “name”: "Magic-Mirror-Module-PIR-Sen’
npm ERR! JSON.parse Failed to parse JSON data.
npm ERR! JSON.parse Note: package.json must be actual JSON, not just JavaScript.npm ERR! A complete log of this run can be found in:
npm ERR! /home/pi/.npm/_logs/2022-01-10T14_40_47_069Z-debug-0.logI am sure you can look at this and see my problem.
Thank you for all your help!