mmkal / handy-redis

A wrapper around node_redis with Promise and TypeScript support.
Apache License 2.0
172 stars 10 forks source link

TypeError: net.isIP is not a function #278

Closed vnguyen972 closed 3 years ago

vnguyen972 commented 3 years ago

I'm trying this in my react typescript project.

npm install handy-redis redis

then

import { createNodeRedisClient } from 'handy-redis'; const client = createNodeRedisClient();

And it gives me error: TypeError: net.isIP is not a function.

What am I missing?

REDIS version: 6.0.10 Handy-redis version: ^2.2.1

mmkal commented 3 years ago

Hi @vnguyen972 - are you trying to use it in the browser (react)? If so, it's not designed for that, this is a nodejs library. I'd suggest looking into something like nextjs which makes it easy to fetch data on the server side and pass it to the client.