Read the statement by Michael Teeuw here.
npm start dev
-
Hi Bangee
I’ve had exactly the same problem. I’ve tried it on a rasp 2, a rasp 3 and still the same result. Tried reinstalling node.js, reinstalling npm. I’m beginning to think there’s something up with Mich;s installation script but I cant find any clues in the output. Apparently it’s known that sometimes electron will fail on some rasp 2’s- so i went ou t and bought a rasp 3. I’m currently trying it again on a new card - if it doesn’t work this time i’ll try the manual install method. No luck yet.
pi@magicpi:~ $ cd MagicMirror/config pi@magicpi:~/MagicMirror/config $ cp config.js.sample config.js pi@magicpi:~/MagicMirror/config $ cd $HOME/MagicMirror pi@magicpi:~/MagicMirror $ npm start > magicmirror@2.0.0 start /home/pi/MagicMirror > electron js/electron.js npm ERR! Linux 4.4.11-v7+ npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "start" npm ERR! node v6.6.0 npm ERR! npm v3.10.3 npm ERR! code ELIFECYCLE npm ERR! magicmirror@2.0.0 start: `electron js/electron.js` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the magicmirror@2.0.0 start script 'electron js/electron.js'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the magicmirror package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! electron js/electron.js npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs magicmirror npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls magicmirror npm ERR! There is likely additional logging output above. npm ERR! Please include the following file with any support request: npm ERR! /home/pi/MagicMirror/npm-debug.log
Note from admin: Please use Markdown on code snippets for easier reading!
-
Hey!
in the readme i found this:
Important: npm start does not work via SSH, use DISPLAY=:0 nohup npm start & instead. This starts the mirror on the remote display.
-
Thanks ost - but I have tried it both from direct physical keyboard and SSH using this command. I’ve been reading a few other problems related to this issue but all seems to come down to “not installing as root user”. Which i’m not - I’m installing as pi. So still scratching my head here.
-
do you have create an mm.sh and starts this with pm2?
-
@ostfilinchen I was just using the standard install script that comes on the tutorial.
curl -sL https://raw.githubusercontent.com/MichMich/MagicMirror/master/installers/raspberry.sh | bash
-
and do u do these steps: https://github.com/MichMich/MagicMirror/wiki/Auto-Starting-MagicMirror
-
hey there
@ostfilinchen that’s it. to startnpm
from my shell it need to use this command:
DISPLAY=:0 npm start dev
But with this I can not debug my script. Electron crashes alwasy on startup when I’ve activated my new module using
const sensorLib = require('node-dht-sensor')
in my node_helper.jsHow can I debug this error?
-
OK i think i’ve solved it. magic mirror HAS to be started (npm start) from a terminal window in the x-window server. you cannot start it over ssh.
-
@shavesophere Thank you. This at least got me to the point where I can show the display on a monitor. Now I just have to walk to the other room to see my changes. :/
-
@shavesophere said in npm start dev:
OK i think i’ve solved it. magic mirror HAS to be started (npm start) from a terminal window in the x-window server. you cannot start it over ssh.
Not true. It can be started over SSH just fine:
DISPLAY=:0 npm start