MagicMirror² v2.5.0 is available! For more information about this release, check out this topic.

pm2 will start MM2 but not npm start?



  • I have been working this for two days now.
    This is the 3rd fresh install /SD card and not having any luck.
    So I have installed MagicMirror 2 on Pi 3B on Stretch 2018-06-27.
    And MagicMirror works in a way.
    So I used pm2 and set it all up.
    On boot pm2 will start the mirror and I can stop and restart the mirror no problems.
    But if I do

    cd MagicMirror
    DISPLAY=:0 npm start
    

    It just give me the screen shot below and locks up the Pi.
    But the mirror server is running and I can see the mirror using a computer on the the network and this is with the Pi locked up and only displaying what in photo.

    And help?

    alt text



  • @geckospotnixie - This isn’t really a lock up. The command your giving will run the MagicMirror process. It’s still running, spitting out messages to the console as things happen. You’ll get your prompt back when the process is complete. Since the process runs in a loop until something outside kills it (or if it crashes hard), you’ll never get your prompt back.

    If you want your command line prompt back, type ctrl-c and it will stop the mirror process and let you enter more commands. If you want to run the mirror process in the background from the command line, add the ampersand to the end of the line. Like so: DISPLAY=:0 npm start &



  • bhepler thank you so much for replying and for the pointers!

    I tried your suggestion but no help it did the same thing.
    Just lockup until I use ctrl+Alt+T to get a terminal window and reboot.

    So I’m confused why when I execute the commands the display does not show MagicMirror?
    These are the same commands in the pm2 scrip file.
    Also this is the way the wiki said to start the Mirror.
    And again at the end of the installation it states to use

    DISPLAY=:0 npm start
    

    in the MagicMirror directory.
    It like the display does not update and show the Mirror?

    But if i boot the Pi the Mirror will start just fine.
    Also if i use pm2 start and stop it works just fine.
    I’m trying to manual start the Mirror so i can start in debug mode and or server only mode.

    Thank you for any help



  • Hello All
    If I use pm2 stop mm will this command stop the npm server also?
    Or what is pm2 to npm?

    Thanks