node-redis icon indicating copy to clipboard operation
node-redis copied to clipboard

fails to resolve redis type definitions

Open SeraphimKaito opened this issue 2 months ago • 3 comments

Description

When importing createClient from redis, the TypeScript language server fails to resolve type definitions, causing:

  1. Type information stuck in loading state: Type hints and IntelliSense for @redis remain in a perpetual loading state
  2. Cascading type resolution failure: This issue affects the entire project's type system, preventing:
    • Type information display for other libraries
    • Type information display for custom code
    • Type navigation (go to definition, find references)
    • Auto-completion and IntelliSense features
Image

Reproduction Steps

  1. Import createClient from redis:

    import { createClient } from "redis";
    
  2. Observe that:

    • Type information does not load
    • IDE shows loading spinner indefinitely
    • No IntelliSense/autocomplete appears
    • Type checking for the entire file/project becomes unresponsive

Note

Version 4 of the Redis client works without issues

Node.js Version

24.2.0

Redis Server Version

7.4.7

Node Redis Version

5.9.0

Platform

Darwin Kernel Version 25.0.0

SeraphimKaito avatar Nov 07 '25 04:11 SeraphimKaito

Hi @sapenlei, what ide are you using? Have you tried changing the ide, restarting your language server provider? I very much doubt this is an actual library issue.

nkaradzhov avatar Nov 07 '25 09:11 nkaradzhov

Hi @sapenlei, what ide are you using? Have you tried changing the ide, restarting your language server provider? I very much doubt this is an actual library issue.

I'm using VS Code (with Cursor also installed). I've restarted the TypeScript language server and the entire editor multiple times, but the problem persists

SeraphimKaito avatar Nov 07 '25 09:11 SeraphimKaito

there’s no issue in WebStorm but there are problems in VS Code and Cursor

SeraphimKaito avatar Nov 07 '25 09:11 SeraphimKaito