Problem
The current peerOptionalDependencies entry for redis in TypeORM v0.3.23 is:
"redis": "^3.1.1 || ^4.0.0"
This blocks installation with redis@5.x under strict npm resolution (e.g. npm v7+), even though Redis is only required when using TypeORM's cache feature.
Why this matters
Many users rely on redis@5.x directly (e.g. for Streams, Pub/Sub, etc.) and don't use TypeORM's Redis integration at all. Still, installation fails unless using --legacy-peer-deps.
This restriction creates unnecessary friction for setups where TypeORM and Redis are both used — independently.
Suggested fix
Relax the peerOptional range in package.json:
"redis": "^3.1.1 || ^4.0.0 || ^5.0.0"
Or ideally:
...since it's an optional peer and not a hard requirement.
Environment
- typeorm: 0.3.23
- redis: 5.5.6
- node: 22.x
- npm: 10.x