diff --git a/packages/core/server/src/gateway/index.ts b/packages/core/server/src/gateway/index.ts index 6e0016c09..91d8c0181 100644 --- a/packages/core/server/src/gateway/index.ts +++ b/packages/core/server/src/gateway/index.ts @@ -215,7 +215,15 @@ export class Gateway extends EventEmitter { } const mainApp = AppSupervisor.getInstance().bootMainApp(options.mainAppOptions); - mainApp.runAsCLI(); + + mainApp + .runAsCLI(process.argv, { + throwError: true, + from: 'node', + }) + .catch((e) => { + console.error(e); + }); } isStart() {