Read the statement by Michael Teeuw here.
PM2 MagicMirror - not working
-
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.
-
-
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' }
-
@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 -
@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.
-
@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
-
I have created a pm2 only script to handle fixing the setup, see
-
@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