Looking at your screenshot, pm2 was already running the mirror software when you gave it the start command. That’s probably why you received the ELIFCYCLE error. If you want to stop pm2 from monitoring/restarting the magic mirror, enter pm2 stop 0
. Then you can run npm start
in the MagicMirror folder and monitor the output.
When you say “I can’t get to the desktop” is that because the magic mirror interface is taking up the screen, or you are at the command line and the desktop interface isn’t running. I’m guessing that your problem is that you’re at the command line and you’re not seeing the desktop (based upon your mention of running startx
. That leads me to conclude that your pi is not booting into the desktop when you start it up. That needs to change.
Somewhere in your raspi-config
menu will be the option to boot to desktop or boot to CLI (command line interface). You need to change that so that you boot to desktop. When you’re looking at the mirror interface, Ctrl+q
will close the interface and get you back to the desktop.
Just be warned: if pm2 is monitoring your mirror, it will notice that something has closed the magic mirror interface and it will restart it again. Ctrl+Alt+t
will give you a terminal window and you can enter pm2 stop 0
to stop that behavior.