From c13530ef32110e25a01136f448da3d35b9667836 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Fri, 2 Jun 2023 13:59:33 +0100 Subject: [PATCH] Stop attempt at bundling ioredis-mock, only need to check at runtime. --- packages/backend-core/src/redis/redis.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/backend-core/src/redis/redis.ts b/packages/backend-core/src/redis/redis.ts index 25a9314c6d..5056a5d549 100644 --- a/packages/backend-core/src/redis/redis.ts +++ b/packages/backend-core/src/redis/redis.ts @@ -3,8 +3,12 @@ import Redis from "ioredis" // mock-redis doesn't have any typing let MockRedis: any | undefined if (env.MOCK_REDIS) { - // ioredis mock is all in memory - MockRedis = require("ioredis-mock") + try { + // ioredis mock is all in memory + MockRedis = require("ioredis-mock") + } catch (err) { + console.log("Mock redis unavailable") + } } import { addDbPrefix,