@fedify/cfworkers 2.4.1 (and the current dev builds) declares a peer dependency on @cloudflare/workers-types@^4.20260511.1. Cloudflare stopped publishing v4 at 4.20260702.1, and latest is now 5.x. The current version of wrangler (4.147.0) declares an optional peer on @cloudflare/workers-types@^5.20261001.1, so npm can't install @fedify/cfworkers alongside wrangler without --legacy-peer-deps or an overrides entry pinning workers-types back to v4.
Reproduction
npm init -y
npm install @fedify/fedify@2.4.1 @fedify/cfworkers@2.4.1 wrangler@4.147.0
npm error code ERESOLVE
npm error ERESOLVE could not resolve
npm error Found: @cloudflare/workers-types@4.20260702.1
npm error peer @cloudflare/workers-types@"^4.20260511.1" from @fedify/cfworkers@2.4.1
npm error Could not resolve dependency:
npm error Conflicting peer dependency: @cloudflare/workers-types@5.20261005.1
npm error peerOptional @cloudflare/workers-types@"^5.20261001.1" from wrangler@4.147.0
Installing @cloudflare/workers-types@5 directly instead of wrangler fails the same way.
Proposed fix
Widen the peer range to accept v5, e.g. ^4.20260511.1 || ^5.20260511.1. The peer currently comes from the "@cloudflare/workers-types": ^4.20260511.1 entry in the pnpm catalog (pnpm-workspace.yaml), via "catalog:" in packages/cfworkers/package.json. So the fix is either to bump that catalog entry or to give the peer its own range. pnpm only warns on peer conflicts, so the workspace probably doesn't hit this, but npm fails outright.
The v5 types appear to work as-is. With --legacy-peer-deps, this typechecks with zero errors against both @cloudflare/workers-types@4.20260702.1 and @5.20261005.1 (TypeScript 6.0.3, @fedify/* 2.4.1):
import { WorkersKvStore, WorkersMessageQueue } from '@fedify/cfworkers';
import type { KvStore, MessageQueue } from '@fedify/fedify';
declare const kv: KVNamespace;
declare const queue: Queue;
const store: KvStore = new WorkersKvStore(kv);
const mq: MessageQueue = new WorkersMessageQueue(queue);
export { mq, store };
{
"compilerOptions": {
"target": "ESNext",
"lib": ["ESNext"],
"module": "ESNext",
"moduleResolution": "bundler",
"strict": true,
"noEmit": true,
"types": ["@cloudflare/workers-types"]
},
"files": ["check.ts"]
}
@fedify/cfworkers 2.4.1 (and the current dev builds) declares a peer dependency on @cloudflare/workers-types@^4.20260511.1. Cloudflare stopped publishing
v4at4.20260702.1, and latest is now5.x. The current version of wrangler (4.147.0) declares an optional peer on @cloudflare/workers-types@^5.20261001.1, so npm can't install @fedify/cfworkers alongside wrangler without--legacy-peer-depsor an overrides entry pinning workers-types back tov4.Reproduction
Installing @cloudflare/workers-types@5 directly instead of wrangler fails the same way.
Proposed fix
Widen the peer range to accept v5, e.g.
^4.20260511.1 || ^5.20260511.1. The peer currently comes from the"@cloudflare/workers-types": ^4.20260511.1entry in the pnpm catalog (pnpm-workspace.yaml), via"catalog:"in packages/cfworkers/package.json. So the fix is either to bump that catalog entry or to give the peer its own range. pnpm only warns on peer conflicts, so the workspace probably doesn't hit this, but npm fails outright.The v5 types appear to work as-is. With
--legacy-peer-deps, this typechecks with zero errors against both @cloudflare/workers-types@4.20260702.1 and@5.20261005.1(TypeScript 6.0.3,@fedify/*2.4.1):{ "compilerOptions": { "target": "ESNext", "lib": ["ESNext"], "module": "ESNext", "moduleResolution": "bundler", "strict": true, "noEmit": true, "types": ["@cloudflare/workers-types"] }, "files": ["check.ts"] }