MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    pm2 will start MM2 but not npm start?

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    4 Posts 2 Posters 1.5k Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • G Offline
      GeckospotNixie
      last edited by GeckospotNixie

      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

      bheplerB 1 Reply Last reply Reply Quote 0
      • bheplerB Offline
        bhepler Module Developer @GeckospotNixie
        last edited by bhepler

        @geckospotnixie - This isn’t really a lock up. The command you’re giving it 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 &

        1 Reply Last reply Reply Quote 0
        • G Offline
          GeckospotNixie
          last edited by GeckospotNixie

          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

          1 Reply Last reply Reply Quote 0
          • G Offline
            GeckospotNixie
            last edited by

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

            Thanks

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            • First post
              Last post
            Enjoying MagicMirror? Please consider a donation!
            MagicMirror created by Michael Teeuw.
            Forum managed by Sam, technical setup by Karsten.
            This forum is using NodeBB as its core | Contributors
            Contact | Privacy Policy