Read the statement by Michael Teeuw here.
MMM-PIR-Sensor - White Screen
-
@yawns
Works a treat. Thanks! -
@bungee09 Did you get the
npm install
to work on the “MMM-PIR-Sensor” directory? Or did you just run thenpm list
to get the version of electron and then runnpm rebuild --runtime=electron --target=1.3.4 --disturl=https://atom.io/download/atom-shell --abi=50
with the right version?Which directory were you in when you ran the rebuild?
Sorry - i’m at work now, so dont have the Pi with me, but have been having issues with this for a week now, so i’m really hoping that this works for me :)
-
@Them-Russians - I feel your frustration! I spent a good few hours debugging this after installing and testing my PIR sensor. This is what eventually worked for me:
I ran all the commands in the MMM-PIR-Sensor Directory.
cd ~/MagicMirror/modules/MMM-PIR-Sensor npm list
I found the electron version number to be “1.4.3” so updated target to 1.4.3. Also, updated abi to 50 in the following command as this was the expected value from the error message in pm2 logs.
npm rebuild --runtime=electron --target=1.4.3 --disturl=https://atom.io/download/atom-shell --abi=50
As soon as the rebuild was complete…
cd pm2 restart mm
… to restart MagicMirror in pm2.
I also found this link which described the same fix.
Good luck!
-
@bungee09 Did your rebuild work successfuly? I got an error saying that i needed to have the latest versions of node.js and npm installed.
I believe I have node version 6.9.4. Is that what you were using?
After all this, i thought maybe i jacked up something, so i cleared out and reformatted the micro SD card. I reinstalled NOOBS and then got the Magic Mirror. Created the config.js file and ran the mirror without issue. Immediately after that, i cloned the PIR module and tried to run an “npm install” which failed, and so did the rebuild :(
-
@Them-Russians The rebuild was successful for me using exactly the method I described above. I don’t have my pi with me currently but I only installed node for the first time last week so I definitely don’t have an old version. I can check the exact version number when I get home for you.
-
@Them-Russians
BTW? Did you install node in the main MagicMirror directory first before installing dependencies in the MMM-PIR-Sensor directory?cd ~/MagicMirror npm install
-
@bungee09 I did not do that install in the Magic Mirror folder. I ran the “curl” command from the github site for the MagicMirror, set up config.js, and then immediately got the PIR module.
Do you think i could run the npm install on the MagicMirror folder now, and try again with the rebuild, or would i have to clear my SD card and reinstall everything and start from scratch?
-
@Them-Russians said in MMM-PIR-Sensor - White Screen:
@bungee09 I did not do that install in the Magic Mirror folder. I ran the “curl” command from the github site for the MagicMirror, set up config.js, and then immediately got the PIR module.
Do you think i could run the npm install on the MagicMirror folder now, and try again with the rebuild, or would i have to clear my SD card and reinstall everything and start from scratch?
Yes, running npm install now will work and it is required.
-
@Them-Russians
npm install in the main MM directory. Then npm install in the PIR sensor directory to install dependencies. If it fails then npm rebuild as above using the correct electron version number and abi. -
@bungee09 The main MagicMirror directory, or the module directory within MagicMirror?