Reproduction Repository
https://github.com/Nefleex/meteor-rpc-types
zod4 branch
git clone https://github.com/Nefleex/meteor-rpc-types
cd meteor-rpc-types
git checkout zod4
meteor npm install
npm run typecheck
Description:
When a project uses zod@4.x, TypeScript reports type errors in meteor-rpc's library files.
Errors:
node_modules/meteor-rpc/lib/createMethod.ts(44,11): error TS2322: Type 'unknown' is not assignable to type 'output<Schema>'.
node_modules/meteor-rpc/lib/createModule.ts(29,52): error TS2345: Type 'input<Schema>' is not assignable to type 'output<Schema>'.
Likely Root Cause:
meteor-rpc has zod@^3.18.0 as a devDependency. Zod 4 introduced breaking changes to the z.input<T> and z.output<T> utility types, which meteor-rpc uses extensively.
Workaround:
Downgrade to zod 3.x.
Reproduction Repository
https://github.com/Nefleex/meteor-rpc-types
zod4 branch
Description:
When a project uses
zod@4.x, TypeScript reports type errors in meteor-rpc's library files.Errors:
Likely Root Cause:
meteor-rpc has
zod@^3.18.0as a devDependency. Zod 4 introduced breaking changes to thez.input<T>andz.output<T>utility types, which meteor-rpc uses extensively.Workaround:
Downgrade to zod 3.x.