尝试使用 pm2 启动 node.js 应用程序时出错:

时间:2021-05-13 07:09:57

标签: javascript node.js linux express pm2

Getting this in pm2 logs, already restarted & killed & flushed logs but still, the problem persists.

当我尝试在运行 pm2 时部署我的应用程序时发生此错误。

[TAILING] Tailing last 15 lines for [all] processes (change the value with --lines option)
/home/ubuntu/.pm2/pm2.log last 15 lines:
PM2        | 2021-05-13T07:04:37: PM2 log: App [index:0] online
PM2        | 2021-05-13T07:04:37: PM2 log: App [index:0] exited with code [1] via signal [SIGINT]
PM2        | 2021-05-13T07:04:37: PM2 log: App [index:0] starting in -fork mode-
PM2        | 2021-05-13T07:04:37: PM2 log: App [index:0] online
PM2        | 2021-05-13T07:04:37: PM2 log: App [index:0] exited with code [1] via signal [SIGINT]
PM2        | 2021-05-13T07:04:37: PM2 log: App [index:0] starting in -fork mode-
PM2        | 2021-05-13T07:04:37: PM2 log: App [index:0] online
PM2        | 2021-05-13T07:04:37: PM2 log: App [index:0] exited with code [1] via signal [SIGINT]
PM2        | 2021-05-13T07:04:37: PM2 log: App [index:0] starting in -fork mode-
PM2        | 2021-05-13T07:04:38: PM2 log: App [index:0] online
PM2        | 2021-05-13T07:04:38: PM2 log: App [index:0] exited with code [1] via signal [SIGINT]
PM2        | 2021-05-13T07:04:38: PM2 log: App [index:0] starting in -fork mode-
PM2        | 2021-05-13T07:04:38: PM2 log: App [index:0] online
PM2        | 2021-05-13T07:04:38: PM2 log: App [index:0] exited with code [1] via signal [SIGINT]
PM2        | 2021-05-13T07:04:38: PM2 log: Script /home/ubuntu/M-9/index.js had too many unstable restarts (16). Stopped. "errored"

/home/ubuntu/.pm2/logs/index-out.log last 15 lines:
/home/ubuntu/.pm2/logs/index-error.log last 15 lines:
0|index    | Require stack:
0|index    | - /home/ubuntu/M-9/index.js
0|index    |     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1030:15)
0|index    |     at Module.Hook._require.Module.require (/home/ubuntu/.nvm/versions/node/v14.5.0/lib/node_modules/pm2/node_modules/require-in-the-middle/index.js:61:29)
0|index    |     at require (internal/modules/cjs/helpers.js:75:18)
0|index    |     at Object.<anonymous> (/home/ubuntu/M-9/index.js:1:17)
0|index    |     at Module._compile (internal/modules/cjs/loader.js:1201:30)
0|index    |     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1221:10)
0|index    |     at Module.load (internal/modules/cjs/loader.js:1050:32)
0|index    |     at Function.Module._load (internal/modules/cjs/loader.js:938:14)
0|index    |     at Object.<anonymous> (/home/ubuntu/.nvm/versions/node/v14.5.0/lib/node_modules/pm2/lib/ProcessContainerFork.js:33:23)
0|index    |     at Module._compile (internal/modules/cjs/loader.js:1201:30) {
0|index    |   code: 'MODULE_NOT_FOUND',
0|index    |   requireStack: [ '/home/ubuntu/M-9/index.js' ]
0|index    | }

0 个答案:

没有答案