当你机器重启后,执行pm2 ls出现一下警告,然后列表为空时:

Current process list is not synchronized with saved list. App demo differs. Type 'pm2 save' to synchronize.

https://blog.bg7zag.com/wp-content/uploads/2024/02/1708568217-20240222101158.jpg

之前启动保存的项目不见了,这时候不要慌,执行下面命令即可恢复:

pm2 update


参考:github issue