Encountering an issue with TypeScript while attempting to create a new Redis instance. I've set up an .env.local file with matching names for the redis URL and token.
import { Redis } from '@upstash/redis'
export const db: Redis = new Redis({
url: process.env.UPSTASH_REDIS_REST_URL,
token: process.env.UPSTASH_REDIS_REST_TOKEN
})
The error message reads:
No overload matches this call.
Overload 2 of 2, '(requesters: Requester): Redis', gave the following error.
Argument of type '{ url: string | undefined; token: string | undefined; }' is not assignable to parameter of type 'Requester'.
Object literal may only specify known properties, and 'url' does not exist in type 'Requester'.ts(2769)
(property) url: string
UPSTASH_REDIS_REST_URL
Any suggestions on how to resolve this issue?
I've researched various sources but unable to make the error go away...