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.

    npm start and black screen

    Scheduled Pinned Locked Moved Troubleshooting
    5 Posts 2 Posters 2.7k Views 2 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.
    • dexterbengD Offline
      dexterbeng
      last edited by

      Here is the log:

      Sockets connected & modules started ...
      Whoops! There was an uncaught exception...
      { Error: listen EADDRINUSE 0.0.0.0:8080
          at Object.exports._errnoException (util.js:1026:11)
          at exports._exceptionWithHostPort (util.js:1049:20)
          at Server._listen2 (net.js:1253:14)
          at listen (net.js:1289:10)
          at net.js:1399:9
          at _combinedTickCallback (internal/process/next_tick.js:77:11)
          at process._tickCallback (internal/process/next_tick.js:98:9)
          at Module.runMain (module.js:592:11)
          at run (bootstrap_node.js:402:7)
          at startup (bootstrap_node.js:157:9)
        code: 'EADDRINUSE',
        errno: 'EADDRINUSE',
        syscall: 'listen',
        address: '0.0.0.0',
        port: 8080 }
      MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
      If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
      Launching application.
      Shutting down server...
      
      

      How to fix this?

      Note : Use “pm2 start mm” is able to run mm.

      dexterbengD 1 Reply Last reply Reply Quote 0
      • dexterbengD Offline
        dexterbeng @dexterbeng
        last edited by

        @dexterbeng
        I found the problem issue https://forum.magicmirror.builders/topic/2209/error-listen-eaddrinuse-help-plox

        So i use pm2 stop mm, then i can use back npm start since no application is using port:8080.

        But still, is there anyone can explain to me, why my pm2 start mm is take while to boot up my mm, even i ctrl+q, it will turn mm back very long time or never turn on again?

        N 1 Reply Last reply Reply Quote 0
        • N Offline
          ninjabreadman @dexterbeng
          last edited by

          @dexterbeng If you have pm2 and the mm script installed, it’s simplest to use pm2 start/stop mm. However, npm start dev is still useful to debug server and client consoles, just don’t forget to first pm2 stop mm as you describe.

          Problem with config or JavaScript? Copy/paste it into JSHint.
          Check out the detailed walkthroughs on install, config, modules, etc.

          dexterbengD 1 Reply Last reply Reply Quote 0
          • dexterbengD Offline
            dexterbeng @ninjabreadman
            last edited by

            @ninjabreadman
            Ya, agree with that pm2 is the easier way.
            By the way, can I know when you using pm2 to start your mm and you ctrl+q to quit it, how long it takes to auto boot it up again?
            For me, it likes 15 seconds to 30 seconds, and sometimes never turn on again…

            N 1 Reply Last reply Reply Quote 0
            • N Offline
              ninjabreadman @dexterbeng
              last edited by ninjabreadman

              @dexterbeng I would guess 15-30 seconds. pm2 has to detect that the process has terminated and restart. It depends on the polling interval for pm2 (which, as far as I can tell from their docs/issues, is 100ms, and cannot be changed – seems more frequent than I expected).

              Why are you killing mm with Ctrl+Q? Better to use pm2 restart mm or even pm2 start mm --watch which will also restart mm after file system changes (you may need to configure which directories to watch).

              Problem with config or JavaScript? Copy/paste it into JSHint.
              Check out the detailed walkthroughs on install, config, modules, etc.

              1 Reply Last reply Reply Quote 2
              • 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