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 MagicMirror - not working

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    8 Posts 3 Posters 1.7k 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
      stalker401
      last edited by

      when i put pm2 start MagicMirror - it looks like it started the pm2 sequence, but the MagicMirror never starts:

      pi@raspberrypi:~ $ pm2 list
      ┌─────────────┬────┬──────┬────────┬─────┬─────┬───────────┐
      │ Name        │ id │ mode │ status │ ↺   │ cpu │ memory    │
      ├─────────────┼────┼──────┼────────┼─────┼─────┼───────────┤
      │ MagicMirror │ 0  │ fork │ online │ 182 │ 0%  │ 20.0 MB   │
      └─────────────┴────┴──────┴────────┴─────┴─────┴───────────┘
       Use `pm2 show <id|name>` to get more details about an app
      pi@raspberrypi:~ $ pm2 stop MagicMirror
      [PM2] Applying action stopProcessId on app [MagicMirror](ids: 0)
      [PM2] [MagicMirror](0) ✓
      ┌─────────────┬────┬──────┬─────────┬─────┬─────┬────────┐
      │ Name        │ id │ mode │ status  │ ↺   │ cpu │ memory │
      ├─────────────┼────┼──────┼─────────┼─────┼─────┼────────┤
      │ MagicMirror │ 0  │ fork │ stopped │ 184 │ 0%  │ 0 B    │
      └─────────────┴────┴──────┴─────────┴─────┴─────┴────────┘
       Use `pm2 show <id|name>` to get more details about an app
      
      

      I tried looking at the one that said pm2 mm.sh issues, but I’m struggling to interpret into my issue (also they could be different).

      So basically this worked earlier today, and than all of a sudden I changed my time on my clock of the raspberry pi, and it no longer works after reboot. I’m sure I did something, but I don’t know what.

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

        @stalker401 type

        pm2 logs
        

        To see what the errors are

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        1 Reply Last reply Reply Quote 0
        • S Offline
          stalker401
          last edited by

          Here’s what the log gave me:

          pi@raspberrypi:~ $ pm2 log MagicMirror
          [TAILING] Tailing last 15 lines for [MagicMirror] process (change the value with --lines option)
          /home/pi/.pm2/logs/MagicMirror-out.log last 15 lines:
          0|MagicMir | No helper found for module: clock.
          0|MagicMir | Initializing new module helper ...
          0|MagicMir | Module helper loaded: calendar
          0|MagicMir | No helper found for module: currentweather.
          0|MagicMir | No helper found for module: weatherforecast.
          0|MagicMir | All module helpers loaded.
          0|MagicMir | Starting server on port 8080 ... 
          0|MagicMir | Server started ...
          0|MagicMir | Connecting socket for: updatenotification
          0|MagicMir | Connecting socket for: calendar
          0|MagicMir | Starting node helper for: calendar
          0|MagicMir | Sockets connected & modules started ...
          0|MagicMir | [SIGINT] Received. Shutting down server...
          0|MagicMir | Stopping module helper: updatenotification
          0|MagicMir | Stopping module helper: calendar
          
          /home/pi/.pm2/logs/MagicMirror-error.log last 15 lines:
          0|MagicMir | { Error: ENOENT: no such file or directory, open 'package.json'
          0|MagicMir |     at Object.openSync (fs.js:439:3)
          0|MagicMir |     at Object.readFileSync (fs.js:344:35)
          0|MagicMir |     at Object.<anonymous> (/home/pi/MagicMirror/js/app.js:15:32)
          0|MagicMir |     at Module._compile (internal/modules/cjs/loader.js:689:30)
          0|MagicMir |     at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
          0|MagicMir |     at Module.load (internal/modules/cjs/loader.js:599:32)
          0|MagicMir |     at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
          0|MagicMir |     at Function.Module._load (internal/modules/cjs/loader.js:530:3)
          0|MagicMir |     at Module.require (internal/modules/cjs/loader.js:637:17)
          0|MagicMir |     at Module.Hook._require.Module.require (/usr/local/lib/node_modules/pm2/node_modules/require-in-the-middle/index.js:70:37)
          0|MagicMir |   errno: -2,
          0|MagicMir |   syscall: 'open',
          0|MagicMir |   code: 'ENOENT',
          0|MagicMir |   path: 'package.json' }
          
          
          S 2 Replies Last reply Reply Quote 0
          • S Offline
            sdetweil @stalker401
            last edited by

            @stalker401 ok. Someone reported a similar problem after updating to latest mm version.

            They did not run

            npm install
            

            From the MagicMirror folder
            And any modules that have a package.json file

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            mumblebajM 1 Reply Last reply Reply Quote 0
            • mumblebajM Offline
              mumblebaj Module Developer @sdetweil
              last edited by

              @sdetweil I am just wondering, are the guys running Raspbian updating to the latest version before updating to 2.8? I did the Raspbian update and and then updated the MM to 2.8, did the npm install in all the modules with a package.json and no issues.

              Check out my modules at: https://github.com/mumblebaj?tab=repositories
              Check my blog-post: https://mumblebaj.xyz/

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

                @mumblebaj no idea. So just experience trouble. Mostly cause they haven’t learned the ins and outs of all this.

                I’m hoping my new update script will help

                Sam

                How to add modules

                learning how to use browser developers window for css changes

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

                  I have created a pm2 only script to handle fixing the setup, see

                  https://forum.magicmirror.builders/topic/10907/new-script-to-install-fix-pm2-config-for-start-on-boot

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

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

                    @stalker401 actually, i’ve seen this before…

                    maybe you DID run npm install in a module folder that does NOT have a package.json file.

                    erase the node_modules folder in that module

                    cd modules/????   ??? is the module name
                    rm -rf node_modules
                    

                    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