A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.
Read the statement by Michael Teeuw here.
pm2 do not work after v2.8.0 Update
-
@Klinge said in pm2 do not work after v2.8.0 Update:
Then I entered
pm2 startup pm2 start /MagicMirror/installers/mm.sh
This path is wrong.
-
@sdetweil Yes, you are right
on my sytem it was
sudo env PATH=$PATH:/usr/bin /usr/lib/node_modules/pm2/bin/pm2 startup systemd -u pi --hp /home/pi
@bhepler Yes, you are right too.
My path above was relative, not absolute. But of course, it was wrong. I entered the absolute path. So I have improved it above :-)
-
I do have the same issue and although I managed to make MM start automatically I now have two instances and one restarts every few seconds because of the same error:
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:776:30) 0|MagicMirror | at Object.Module._extensions..js (internal/modules/cjs/loader.js:787: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:690: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
pi@raspberrypi:~ $ pm2 status all ┌─────────────┬────┬─────────┬──────┬──────┬────────┬─────────┬────────┬─────┬───────────┬──────┬──────────┐ │ App name │ id │ version │ mode │ pid │ status │ restart │ uptime │ cpu │ mem │ user │ watching │ ├─────────────┼────┼─────────┼──────┼──────┼────────┼─────────┼────────┼─────┼───────────┼──────┼──────────┤ │ MagicMirror │ 0 │ 2.8.0 │ fork │ 2096 │ online │ 87 │ 1s │ 0% │ 30.9 MB │ pi │ disabled │ │ mm │ 1 │ 2.8.0 │ fork │ 914 │ online │ 0 │ 3m │ 0% │ 2.5 MB │ pi │ disabled │ └─────────────┴────┴─────────┴──────┴──────┴────────┴─────────┴────────┴─────┴───────────┴──────┴──────────┘ Use `pm2 show <id|name>` to get more details about an app
How do I:
a) fix MagicMirror startup script
or
b) make it stop from auto starting (e.g. stopping it manually via pm2 stop MagicMirror and then saving the state with pm2 save doesn’t work) -
@Ivanov_d pm2 stop 0
Then pm2 remove 0 -
This post is deleted!