diff --git a/lib/redis.ts b/lib/redis.ts index bc0e1fe..6076321 100644 --- a/lib/redis.ts +++ b/lib/redis.ts @@ -3,7 +3,7 @@ import Redis from 'ioredis'; let redis; if (!redis) { - redis = new Redis(process.env.REDIS_URL); + redis = new Redis(process.env.REDIS_URL!); redis.on('error', (err) => { console.error('Redis Client Error:', err); diff --git a/package.json b/package.json index 4daed9c..91e65fa 100644 --- a/package.json +++ b/package.json @@ -81,6 +81,7 @@ "@testing-library/react": "^16.2.0", "@types/compression": "^1.7.5", "@types/dompurify": "^3", + "@types/ioredis": "^5.0.0", "@types/jest": "^29.5.14", "@types/lodash": "^4.17.14", "@types/mdx": "^2.0.13", diff --git a/yarn.lock b/yarn.lock index 7b2e28d..9ab9b3c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4325,6 +4325,15 @@ __metadata: languageName: node linkType: hard +"@types/ioredis@npm:^5.0.0": + version: 5.0.0 + resolution: "@types/ioredis@npm:5.0.0" + dependencies: + ioredis: "npm:*" + checksum: 10c0/e52ce4239f0334701fc95fb5aaf1753d75f7582099fdf152743192f49d9ee4a88478b339d015e50cb5e111e38925846cf20668355f4046af7855021d2be181f0 + languageName: node + linkType: hard + "@types/istanbul-lib-coverage@npm:*, @types/istanbul-lib-coverage@npm:^2.0.0, @types/istanbul-lib-coverage@npm:^2.0.1": version: 2.0.6 resolution: "@types/istanbul-lib-coverage@npm:2.0.6" @@ -7995,7 +8004,7 @@ __metadata: languageName: node linkType: hard -"ioredis@npm:^5.4.2": +"ioredis@npm:*, ioredis@npm:^5.4.2": version: 5.4.2 resolution: "ioredis@npm:5.4.2" dependencies: @@ -12618,6 +12627,7 @@ __metadata: "@testing-library/react": "npm:^16.2.0" "@types/compression": "npm:^1.7.5" "@types/dompurify": "npm:^3" + "@types/ioredis": "npm:^5.0.0" "@types/jest": "npm:^29.5.14" "@types/lodash": "npm:^4.17.14" "@types/mdx": "npm:^2.0.13"