PM2 doesn't support bun properly. Use the following workaround suggested by @ofmendez on a related GitHub issue:
Pretend node is bun (may be optional).
cd ~/.local/bin
ln -s `which bun` nodeStart the app with PM2.
cd %OFF_ALARM_DIR%
pm2 start "bun src/index.ts" --name "off-alarm" --exp-backoff-restart-delay 10000Save the PM2 process list.
pm2 saveCheck the status of the process. Note the PID of the off-alarm process.
pm2 statusCheck the process is indeed being run in bun.
ps -p $PID_OFF_ALARM -o args=