Amazon AWS Ubuntu server
~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.5 LTS
Release: 16.04
Codename: xenial
问题:PM2 已过期
$ pm2 list
>>>> In-memory PM2 is out-of-date, do:
>>>> $ pm2 update
In memory PM2 version: 2.4.6
Local PM2 version: 3.0.3
试
pm2 update
。工作直到我重新启动
试
npm remove pm2 -g
which pm2
npm install pm2@latest -g
which pm2
sudo reboot
有什么指示吗?
我遇到了同样的问题,可以通过重新创建启动脚本来解决它。请尝试以下步骤:
- 删除当前进程
pm2 delete nameOfProcess
- 卸载当前启动脚本
pm2 unstartup systemd
- 更新 PM2
pm2 update
- 启用启动脚本
pm2 startup //copy paste the output
- 再次启动进程
pm2 start nameOfProcess
- 保存当前配置
pm2 save