Hello!!
currently I have some issues when run pm2 start index.js
in server
I get this issue:
/home/user/.pm2/pm2.log last 15 lines:
PM2 | 2024-04-15T18:26:06: PM2 log: App [Multiservice:0] exited with code [1] via signal [SIGINT]
PM2 | 2024-04-15T18:26:06: PM2 log: App [Multiservice:0] starting in -fork mode-
PM2 | 2024-04-15T18:26:06: PM2 log: App [Multiservice:0] online
PM2 | 2024-04-15T18:26:07: PM2 log: App [Multiservice:0] exited with code [1] via signal [SIGINT]
PM2 | 2024-04-15T18:26:07: PM2 log: App [Multiservice:0] starting in -fork mode-
PM2 | 2024-04-15T18:26:07: PM2 log: App [Multiservice:0] online
PM2 | 2024-04-15T18:26:07: PM2 log: App [Multiservice:0] exited with code [1] via signal [SIGINT]
PM2 | 2024-04-15T18:26:07: PM2 log: App [Multiservice:0] starting in -fork mode-
PM2 | 2024-04-15T18:26:07: PM2 log: App [Multiservice:0] online
PM2 | 2024-04-15T18:26:08: PM2 log: App [Multiservice:0] exited with code [1] via signal [SIGINT]
PM2 | 2024-04-15T18:26:08: PM2 log: App [Multiservice:0] starting in -fork mode-
PM2 | 2024-04-15T18:26:08: PM2 log: App [Multiservice:0] online
PM2 | 2024-04-15T18:26:09: PM2 log: App [Multiservice:0] exited with code [1] via signal [SIGINT]
PM2 | 2024-04-15T18:26:09: PM2 log: App [Multiservice:0] starting in -fork mode-
PM2 | 2024-04-15T18:26:09: PM2 log: App [Multiservice:0] online
/home/user/.pm2/logs/Multiservice.log last 15 lines:
/home/user/.pm2/logs/Multiservice.log last 15 lines:
0|Multiser | at Module.require (node:internal/modules/cjs/loader:1100:19)
0|Multiser | at Module.Hook._require.Module.require (/usr/lib/node_modules/pm2/node_modules/require-in-the-middle/index.js:101:39)
0|Multiser | at require (node:internal/modules/cjs/helpers:119:18)
0|Multiser | at Object.<anonymous> (/home/user/proyect/Multiservice/dist/app/server.js:18:13)
0|Multiser | ArgumentError: Must provide a domain
0|Multiser | at new ManagementClient (/home/user/proyect/Multiservice/node_modules/auth0/src/management/index.js:120:13)
0|Multiser | at Object.<anonymous> (/home/user/proyect/Multiservice/dist/utils/auth0.js:18:29)
0|Multiser | at Module._compile (node:internal/modules/cjs/loader:1198:14)
0|Multiser | at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10)
0|Multiser | at Module.load (node:internal/modules/cjs/loader:1076:32)
0|Multiser | at Function.Module._load (node:internal/modules/cjs/loader:911:12)
0|Multiser | at Module.require (node:internal/modules/cjs/loader:1100:19)
0|Multiser | at Module.Hook._require.Module.require (/usr/lib/node_modules/pm2/node_modules/require-in-the-middle/index.js:101:39)
0|Multiser | at require (node:internal/modules/cjs/helpers:119:18)
0|Multiser | at Object.<anonymous> (/home/user/proyect/Multiservice/dist/app/server.js:18:13)
I have my own scripts
for test my proyect, when I run npm run start
(running build file) or npm run start:dev
proyect run perfectly! , so this is ok!
but, if I tried to use pm2 run start index.js
don’t work it, show errors
so what’s wrong?
on my file .env
I push my variables enviroments: domain, client id, cliente secret, audience