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 restarts magicmirror every few seconds

    Scheduled Pinned Locked Moved Solved Troubleshooting
    6 Posts 3 Posters 2.4k Views 3 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.
    • S Offline
      sdetweil @panos
      last edited by

      @panos do

      pm2 logs
      

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      1 Reply Last reply Reply Quote 0
      • P Offline
        panos
        last edited by

        PM2            | App [MagicMirror:0] exited with code [1] via signal [SIGINT]
        PM2            | App [MagicMirror:0] starting in -fork mode-
        PM2            | App [MagicMirror:0] online
        0|MagicMirror  | { Error: ENOENT: no such file or directory, open 'package.json'
        0|MagicMirror  |     at Object.openSync (fs.js:443:3)
        0|MagicMirror  |     at Object.readFileSync (fs.js:343:35)
        0|MagicMirror  |     at Object.<anonymous> (/home/pi/MagicMirror/js/app.js:15:32)
        0|MagicMirror  |     at Module._compile (internal/modules/cjs/loader.js:778:30)
        0|MagicMirror  |     at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
        0|MagicMirror  |     at Module.load (internal/modules/cjs/loader.js:653:32)
        0|MagicMirror  |     at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
        0|MagicMirror  |     at Function.Module._load (internal/modules/cjs/loader.js:585:3)
        0|MagicMirror  |     at Module.require (internal/modules/cjs/loader.js:692:17)
        0|MagicMirror  |     at Module.Hook._require.Module.require (/usr/lib/node_modules/pm2/node_modules/require-in-the-middle/index.js:70:37)
        0|MagicMirror  |   errno: -2,
        0|MagicMirror  |   syscall: 'open',
        0|MagicMirror  |   code: 'ENOENT',
        0|MagicMirror  |   path: 'package.json' }
        PM2            | App [MagicMirror:0] exited with code [1] via signal [SIGINT]
        PM2            | App [MagicMirror:0] starting in -fork mode-
        PM2            | App [MagicMirror:0] online
        
        
        0|MagicMirror  | { Error: ENOENT: no such file or directory, open 'package.json'
        0|MagicMirror  |     at Object.openSync (fs.js:443:3)
        0|MagicMirror  |     at Object.readFileSync (fs.js:343:35)
        0|MagicMirror  |     at Object.<anonymous> (/home/pi/MagicMirror/js/app.js:15:32)
        0|MagicMirror  |     at Module._compile (internal/modules/cjs/loader.js:778:30)
        0|MagicMirror  |     at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
        0|MagicMirror  |     at Module.load (internal/modules/cjs/loader.js:653:32)
        0|MagicMirror  |     at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
        0|MagicMirror  |     at Function.Module._load (internal/modules/cjs/loader.js:585:3)
        0|MagicMirror  |     at Module.require (internal/modules/cjs/loader.js:692:17)
        0|MagicMirror  |     at Module.Hook._require.Module.require (/usr/lib/node_modules/pm2/node_modules/require-in-the-middle/index.js:70:37)
        0|MagicMirror  |   errno: -2,
        0|MagicMirror  |   syscall: 'open',
        0|MagicMirror  |   code: 'ENOENT',
        0|MagicMirror  |   path: 'package.json' }
        
        1 Reply Last reply Reply Quote 0
        • bheplerB Offline
          bhepler Module Developer
          last edited by

          PM2 is restarting the mirror because the mirror process keeps crashing. Let’s try a rebuild. Try this:

          pm2 stop all
          cd /home/pi/MagicMirror
          npm install
          pm2 start 0
          
          1 Reply Last reply Reply Quote 0
          • P Offline
            panos
            last edited by panos

            I tried this with no luck:(
            The issue persists…

            -EDIT-
            I manage to resolve the issue:

            • pm2 delete MagicMirror
            • pm2 start /home/pi/MagicMirror/installers/mm.sh
            • pm2 save

            pm2 process name is now ‘mm’ instead of ‘MagicMirror’
            so
            “pm2 start|stop|restart mm” is now the command that I will use
            Thanks for your help!!
            Cheers:)

            S 1 Reply Last reply Reply Quote 1
            • S Offline
              sdetweil @panos
              last edited by sdetweil

              @panos yes, when doing install, it uses a config file which supplies a title. It’s in the installers folder

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              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