alseambusher/crontab-ui

Can't run with pm2

AsixJin opened this issue · 1 comments

I can run crontab-ui by itself just fine but when I run it using pm2 with the following command:

CRON_DB_PATH=/home/kingasix/crontab-ui pm2 start crontab-ui -- --autosave

it errors out with the following error:

[TAILING] Tailing last 15 lines for [all] processes (change the value with --lines option)
/home/kingasix/.pm2/pm2.log last 15 lines:
PM2        | 2022-12-28T20:22:57: PM2 log: App [crontab-ui:0] online
PM2        | 2022-12-28T20:22:57: PM2 log: App [crontab-ui:0] exited with code [1] via signal [SIGINT]
PM2        | 2022-12-28T20:22:57: PM2 log: App [crontab-ui:0] starting in -fork mode-
PM2        | 2022-12-28T20:22:57: PM2 log: App [crontab-ui:0] online
PM2        | 2022-12-28T20:22:57: PM2 log: App [crontab-ui:0] exited with code [1] via signal [SIGINT]
PM2        | 2022-12-28T20:22:57: PM2 log: App [crontab-ui:0] starting in -fork mode-
PM2        | 2022-12-28T20:22:57: PM2 log: App [crontab-ui:0] online
PM2        | 2022-12-28T20:22:57: PM2 log: App [crontab-ui:0] exited with code [1] via signal [SIGINT]
PM2        | 2022-12-28T20:22:57: PM2 log: App [crontab-ui:0] starting in -fork mode-
PM2        | 2022-12-28T20:22:57: PM2 log: App [crontab-ui:0] online
PM2        | 2022-12-28T20:22:58: PM2 log: App [crontab-ui:0] exited with code [1] via signal [SIGINT]
PM2        | 2022-12-28T20:22:58: PM2 log: App [crontab-ui:0] starting in -fork mode-
PM2        | 2022-12-28T20:22:58: PM2 log: App [crontab-ui:0] online
PM2        | 2022-12-28T20:22:58: PM2 log: App [crontab-ui:0] exited with code [1] via signal [SIGINT]
PM2        | 2022-12-28T20:22:58: PM2 log: Script /home/kingasix/crontab-ui had too many unstable restarts (16). Stopped. "errored"

/home/kingasix/.pm2/logs/crontab-ui-out.log last 15 lines:
/home/kingasix/.pm2/logs/crontab-ui-error.log last 15 lines:
0|crontab- |   requireStack: []
0|crontab- | }
0|crontab- | Error: Cannot find module '/home/kingasix/crontab-ui'
0|crontab- |     at Module._resolveFilename (node:internal/modules/cjs/loader:1039:15)
0|crontab- |     at Module._load (node:internal/modules/cjs/loader:885:27)
0|crontab- |     at Object.<anonymous> (/usr/lib/node_modules/pm2/lib/ProcessContainerFork.js:33:23)
0|crontab- |     at Module._compile (node:internal/modules/cjs/loader:1218:14)
0|crontab- |     at Module._extensions..js (node:internal/modules/cjs/loader:1272:10)
0|crontab- |     at Module.load (node:internal/modules/cjs/loader:1081:32)
0|crontab- |     at Module._load (node:internal/modules/cjs/loader:922:12)
0|crontab- |     at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:82:12)
0|crontab- |     at node:internal/main/run_main_module:23:47 {
0|crontab- |   code: 'MODULE_NOT_FOUND',
0|crontab- |   requireStack: []
0|crontab- | }

My npm/node is up to date so I'm not sure what I could be doing wrong. Does anyone think they can help?

stale commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.