diff --git a/packages/cli/src/AbstractServer.ts b/packages/cli/src/AbstractServer.ts index cde2ff3fdd..55eae9376a 100644 --- a/packages/cli/src/AbstractServer.ts +++ b/packages/cli/src/AbstractServer.ts @@ -55,6 +55,8 @@ export abstract class AbstractServer { protected endpointWebhookWaiting: string; + protected instanceId = ''; + abstract configure(): Promise; constructor() { diff --git a/packages/cli/src/Server.ts b/packages/cli/src/Server.ts index c6ae91e280..e8eb44eba3 100644 --- a/packages/cli/src/Server.ts +++ b/packages/cli/src/Server.ts @@ -444,13 +444,15 @@ class Server extends AbstractServer { async configure(): Promise { configureMetrics(this.app); + this.instanceId = await UserSettings.getInstanceId(); + this.frontendSettings.isNpmAvailable = await exec('npm --version') .then(() => true) .catch(() => false); this.frontendSettings.versionCli = N8N_VERSION; - this.frontendSettings.instanceId = await UserSettings.getInstanceId(); + this.frontendSettings.instanceId = this.instanceId; await this.externalHooks.run('frontend.settings', [this.frontendSettings]);