Summary
node-resque's package.json declares ioredis: "^5.9.1". Both ioredis@5.10.0 and ioredis@5.10.1 satisfy that range. In downstream projects that also depend directly on ioredis at a higher pin (e.g. keryx pins ioredis@^5.10.1), bun can end up with two physically distinct copies of ioredis on disk — one under node-resque, one at the top level. TypeScript then sees two nominally-distinct Redis class declarations and reports them as unassignable to each other, due to protected-member nominal typing on AbstractConnector.
Downstream failure
keryx hits this: actionhero/keryx#416
The error in a consumer project's tsc run:
node_modules/.bun/keryx@0.25.3+.../node_modules/keryx/initializers/resque.ts(58,23): error TS2322:
Type 'Redis' is not assignable to type 'Redis | Cluster | undefined'.
Type 'import(".../ioredis@5.10.1/.../Redis").default' is not assignable to
type 'import(".../ioredis@5.10.0/.../Redis").default'.
Property 'connecting' is protected but type 'AbstractConnector' is not
a class derived from 'AbstractConnector'.
The root cause is that ^5.9.1 allows both 5.10.0 and 5.10.1 to coexist in a tree where some peers pin tighter. Vercel's build cache makes this especially painful because stale .bun/ioredis@5.10.0 directories survive across deploys even when the lockfile only references 5.10.1.
Ask
Tighten the ioredis range so 5.10.0 can't be picked. Either of:
"ioredis": "^5.10.1" — simplest, matches the current known-good version
"ioredis": ">=5.10.1 <6" — equivalent, slightly more explicit
A patch release of node-resque with this narrower range would let keryx bump its node-resque dep and close its issue with no code change. Without it, keryx has to ship an as any workaround at every call site that passes api.redis.redis into Queue / Scheduler / Worker.
Context
node-resque@9.5.0 / 9.5.1 (both declare ^5.9.1)
ioredis@5.10.0 and 5.10.1 both published; ^5.9.1 matches both
- Reported against keryx
0.25.0–0.25.3, observed on bun workspaces building on Vercel
Summary
node-resque'spackage.jsondeclaresioredis: "^5.9.1". Bothioredis@5.10.0andioredis@5.10.1satisfy that range. In downstream projects that also depend directly onioredisat a higher pin (e.g. keryx pinsioredis@^5.10.1), bun can end up with two physically distinct copies of ioredis on disk — one under node-resque, one at the top level. TypeScript then sees two nominally-distinctRedisclass declarations and reports them as unassignable to each other, due to protected-member nominal typing onAbstractConnector.Downstream failure
keryx hits this: actionhero/keryx#416
The error in a consumer project's
tscrun:The root cause is that
^5.9.1allows both 5.10.0 and 5.10.1 to coexist in a tree where some peers pin tighter. Vercel's build cache makes this especially painful because stale.bun/ioredis@5.10.0directories survive across deploys even when the lockfile only references 5.10.1.Ask
Tighten the
ioredisrange so 5.10.0 can't be picked. Either of:"ioredis": "^5.10.1"— simplest, matches the current known-good version"ioredis": ">=5.10.1 <6"— equivalent, slightly more explicitA patch release of node-resque with this narrower range would let keryx bump its
node-resquedep and close its issue with no code change. Without it, keryx has to ship anas anyworkaround at every call site that passesapi.redis.redisintoQueue/Scheduler/Worker.Context
node-resque@9.5.0/9.5.1(both declare^5.9.1)ioredis@5.10.0and5.10.1both published;^5.9.1matches both0.25.0–0.25.3, observed on bun workspaces building on Vercel