Skip to content

Typescript error configuring client socket at version v5.x (Heroku example) #3023

@ValorHeart

Description

@ValorHeart

Description

I'm having my redis configured to use TLS according to Heroku's example

const redis = require("redis");

const redis_url = process.env.REDIS_URL;
const client = redis.createClient({
  url: redis_url,
  socket: {
    tls: (redis_url.match(/rediss:/) != null),
    rejectUnauthorized: false,
  }
});

While it is working just fine with client v4.x, in version v5.x it gives a type error:

Image

Node.js Version

22.16.0

Redis Server Version

N/A

Node Redis Version

5.6.0

Platform

MacOS

Logs

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions