diff --git a/packages/cli/src/services/community-node-types.service.ts b/packages/cli/src/services/community-node-types.service.ts index 576871c5c9..c0e1703583 100644 --- a/packages/cli/src/services/community-node-types.service.ts +++ b/packages/cli/src/services/community-node-types.service.ts @@ -1,5 +1,5 @@ import type { CommunityNodeType } from '@n8n/api-types'; -import { Logger } from '@n8n/backend-common'; +import { Logger, inProduction } from '@n8n/backend-common'; import { GlobalConfig } from '@n8n/config'; import { Service } from '@n8n/di'; import { ensureError, type INodeTypeDescription } from 'n8n-workflow'; @@ -46,7 +46,9 @@ export class CommunityNodeTypesService { this.globalConfig.nodes.communityPackages.enabled && this.globalConfig.nodes.communityPackages.verifiedEnabled ) { - const environment = this.globalConfig.license.tenantId === 1 ? 'production' : 'staging'; + // Cloud sets ENVIRONMENT to 'production' or 'staging' depending on the environment + const environment = + inProduction || process.env.ENVIRONMENT === 'production' ? 'production' : 'staging'; data = await getCommunityNodeTypes(environment); }