@Them-Russians I think you definitely need to rebuild electron. I can’t see what else is causing the issue. Try with different electron version numbers. Otherwise I’m all out of ideas. Sorry!
Read the statement by Michael Teeuw here.
Latest posts made by bungee09
-
RE: MMM-PIR-Sensor - White Screen
-
RE: MMM-PIR-Sensor - White Screen
@Them-Russians In the main directory
cd ~/MagicMirror/ npm install && npm start
-
RE: MMM-PIR-Sensor - White Screen
@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. -
RE: MMM-PIR-Sensor - White Screen
@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
-
RE: MMM-PIR-Sensor - White Screen
@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.
-
RE: MMM-PIR-Sensor - White Screen
@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!
-
RE: MMM-PIR-Sensor - White Screen
Similar problem to @Them-Russians when running npm install. Then after starting MM using pm2 I get a white screen. Checking the pm2 error logs I see the following error with a module version mismatch: “Expected 50, got 49”.
0|mm | App threw an error during load 0|mm | Error: Module version mismatch. Expected 50, got 49. 0|mm | at Error (native) 0|mm | at process.module.(anonymous function) [as dlopen] (ELECTRON_ASAR.js:173:20) 0|mm | at Object.Module._extensions..node (module.js:583:18) 0|mm | at Object.module.(anonymous function) [as .node] (ELECTRON_ASAR.js:173:20) 0|mm | at Module.load (module.js:473:32) 0|mm | at tryModuleLoad (module.js:432:12) 0|mm | at Function.Module._load (module.js:424:3) 0|mm | at Module.require (module.js:483:17) 0|mm | at require (internal/module.js:20:19) 0|mm | at bindings (/home/pi/MagicMirror/modules/MMM-PIR-Sensor/node_modules/bindings/bindings.js:76:44)
Tried @James solution using npm rebuild but changed the version parameter to 50. Still no luck.
npm rebuild --runtime=electron --target=1.3.4 --disturl=https://atom.io/download/atom-shell --abi=50
Any help would be much appreciated before I reformat my sd card and start from scratch.