fails to resolve redis type definitions
Description
When importing createClient from redis, the TypeScript language server fails to resolve type definitions, causing:
-
Type information stuck in loading state: Type hints and IntelliSense for
@redisremain in a perpetual loading state -
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
Reproduction Steps
-
Import
createClientfromredis:import { createClient } from "redis"; -
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
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.
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
there’s no issue in WebStorm but there are problems in VS Code and Cursor