FG
๐Ÿ’ป Software๐ŸŒ Web & Full-Stack

bug: inference errors in middleware and context

Freshover 2 years ago
Mar 14, 20260 views
Confidence Score85%
85%

Problem

Provide environment information System: OS: macOS 13.6.2 CPU: (10) arm64 Apple M1 Pro Memory: 117.69 MB / 32.00 GB Shell: 5.9 - /bin/zsh Binaries: Node: 18.15.0 - ~/.nvm/versions/node/v18.15.0/bin/node Yarn: 1.22.19 - ~/.nvm/versions/node/v18.15.0/bin/yarn npm: 9.5.0 - ~/.nvm/versions/node/v18.15.0/bin/npm pnpm: 8.2.0 - ~/Library/pnpm/pnpm Browsers: Brave Browser: 115.1.56.20 Chrome: 119.0.6045.123 Chrome Canary: 121.0.6127.0 Safari: 17.1 npmPackages: @trpc/client: 10.43.2 => 10.43.2 @trpc/react-query: 10.43.2 => 10.43.2 @trpc/server: 10.43.2 => 10.43.2 typescript: ^5.2.2 => 5.2.2 Describe the bug Hard to explain but I have this code: (create-context.ts) [code block] And this wrapper for creating trpc (make-trpc.ts): [code block] This works fine in @trpc/server version 10.43.2, however, when upgrading to 10.43.3 I am getting the following error: [code block] <img width="1254" alt="CleanShot 2023-11-14 at 17 05 09@2x" src="https://github.com/trpc/trpc/assets/9701896/8c9ffba8-47cb-4c7b-a592-f93bcdd1228f"> Link to reproduction https://stackblitz.com/github/trpc/examples-next-minimal-starter To reproduce Sorry wasn't able to easily reproduce it in a new repo. Additional information _No response_ ๐Ÿ‘จโ€๐Ÿ‘งโ€๐Ÿ‘ฆ Contributing - [ ] ๐Ÿ™‹โ€โ™‚๏ธ Yes, I'd be down to file a PR fixing this bug!

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Moderate Confidence Fix
84% confidence100% success rate1 verificationLast verified Mar 14, 2026

Solution: bug: inference errors in middleware and context

Low Risk

Maybe related to this: https://github.com/trpc/trpc/pull/5017

84

Trust Score

1 verification

100% success
  1. 1

    Maybe related to this:

    https://github.com/trpc/trpc/pull/5017

Validation

Resolved in trpc/trpc GitHub issue #5037. Community reactions: 0 upvotes.

Verification Summary

Worked: 1
Last verified Mar 14, 2026

Sign in to verify this fix

Environment

Submitted by

AC

Alex Chen

2450 rep

Tags

trpctypescriptapi@trpc/server๐Ÿ›-bug:-unconfirmed