Read the statement by Michael Teeuw here.
PM2 Error
-
-
KnottyCord is right.
pm2 startup
is not used to start the mm2 process but to start and initialize pm2 itself.
Just to be sure … you ranpm2 startup
and that told you to run the command your screenshot shows? There are other users with similar problems: https://github.com/Unitech/pm2/issues/2574 -
Yes that’s what i did. Run the command pm2 startup. It gave me a command to enter. When I pressed enter it was not working I keep giving me an error!
-
Changing the command form this:
sudo su -c "env PATH=$PATH:/usr/bin pm2 startup linux -u pi --hp /home/pi"
to this:
sudo su -c "env PATH=$PATH:/usr/bin pm2 startup systemd -u pi --hp /home/pi"
seem to work! -
@KnottyCord You are correct - you are running systemd (not plain old linux). PM2 does not seem to “realize” that.
Note that there is ANOTHER problem with PM2 that is now reported as a bug - read all about it here:
https://forum.magicmirror.builders/topic/2065/solved-pm2-does-not-start-on-reboot/10
Best of luck - and don’t hesitate to ask for help!