\n\n\n\n### Link to reproduction\n\nNot Needed\n\n### To reproduce\n\nfetch an query on the server and the error type is messed up\n\n### Additional information\n\n_No response_\n\n### 👨👧👦 Contributing\n\n- [ ] 🙋♂️ Yes, I'd be down to file a PR fixing this bug!",[3172],{"name":3173,"color":3174},"🐛 bug: unconfirmed","e99695",6956,"trpc","open","bug: since TRPC v11.5.0 errors on createTRPCOptionsProxy are broken and not typed properly","2025-09-22T23:38:43Z","https://github.com/trpc/trpc/issues/6956",0.6330638,{"description":3183,"labels":3184,"number":3186,"owner":3176,"repository":3176,"state":3177,"title":3187,"updated_at":3188,"url":3189,"score":3190},"### Provide environment information\n\n```bash\n System:\n OS: Linux 6.12 Debian GNU/Linux 13 (trixie) 13 (trixie)\n CPU: (8) x64 Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz\n Memory: 5.37 GB / 31.11 GB\n Container: Yes //Not running inside a container\n Shell: 5.2.37 - /bin/bash\n Binaries:\n Node: 22.18.0 - ~/.nvm/versions/node/v22.18.0/bin/node\n npm: 11.5.2 - ~/.nvm/versions/node/v22.18.0/bin/npm\n pnpm: 10.15.1 - ~/.nvm/versions/node/v22.18.0/bin/pnpm\n bun: 1.2.21 - ~/.bun/bin/bun\n Browsers:\n Chrome: 140.0.7339.80\n npmPackages:\n @tanstack/react-query: catalog:tanstack => 5.87.1 \n @trpc/client: catalog:trpc => 11.5.1 \n @trpc/react-query: catalog:trpc => 11.5.1 \n @trpc/server: catalog:trpc => 11.5.1 \n next: catalog:next15 => 15.5.2 \n react: catalog:react19 => 19.1.0 \n typescript: catalog: => 5.9.2 \n````\n\n### Describe the bug\n\nI am switching my app to a `Turbo Repo`, when using `createTRPCReact` , all `TRPC Routes` are `undefined`, when I switch to `createTRPCContext`, it's working!\n\nType checking is working in both cases!\n\nI commented the working code\n\n**Provider**\n```typescript\n\"use client\";\nimport { useState, type ReactNode } from \"react\";\nimport {\n // createTRPCClient,\n createTRPCReact,\n httpBatchStreamLink,\n loggerLink,\n} from \"@trpc/react-query\";\nimport { QueryClient, QueryClientProvider } from \"@tanstack/react-query\";\nimport { ReactQueryDevtools } from \"@tanstack/react-query-devtools\";\nimport { NextIntlClientProvider, type AbstractIntlMessages } from \"next-intl\";\n// import { createTRPCContext } from \"@trpc/tanstack-react-query\";\nimport { createQueryClient } from \"@l/query\";\nimport SuperJSON from \"superjson\";\nimport type { AppRouter } from \"@hwa/server\";\nimport type { OLanguages } from \"@hwa/validation/shared\";\nimport { type inferRouterInputs, type inferRouterOutputs } from \"@trpc/server\";\n\nlet clientQueryClientSingleton: QueryClient | undefined = undefined;\nconst getQueryClient = () => {\n if (typeof window === \"undefined\") {\n // Server: always make a new query client\n return createQueryClient();\n }\n // Browser: use singleton pattern to keep the same query client\n clientQueryClientSingleton ??= createQueryClient();\n\n return clientQueryClientSingleton;\n};\n\n// export const { TRPCProvider, useTRPC, useTRPCClient } =\n// createTRPCContext\u003CAppRouter>();\n\nexport const { Provider, createClient, ...api } = createTRPCReact\u003CAppRouter>();\n\nexport type RouterInputs = inferRouterInputs\u003CAppRouter>;\n\nexport type RouterOutputs = inferRouterOutputs\u003CAppRouter>;\n\nconst AppProvider = ({\n locale,\n messages,\n children,\n}: {\n locale: OLanguages;\n messages: AbstractIntlMessages;\n children: ReactNode;\n}) => {\n const queryClient = getQueryClient();\n const [trpcClient] = useState(() =>\n // createTRPCClient\u003CAppRouter>({\n createClient({\n links: [\n loggerLink({\n enabled: (op) =>\n process.env.NODE_ENV === \"development\" ||\n (op.direction === \"down\" && op.result instanceof Error),\n }),\n httpBatchStreamLink({\n transformer: SuperJSON,\n url: \"https://dev.localtest.com:3006/v1\",\n headers() {\n const headers = new Headers();\n headers.set(\"x-trpc-source\", \"nextjs-react\");\n return headers;\n },\n fetch(url, options) {\n return fetch(url, {\n ...options,\n credentials: \"include\", \n });\n },\n }),\n ],\n }),\n );\n return (\n \u003CQueryClientProvider client={queryClient}>\n {/* \u003CTRPCProvider trpcClient={trpcClient} queryClient={queryClient}> */}\n \u003CProvider client={trpcClient} queryClient={queryClient}>\n \u003CNextIntlClientProvider\n locale={locale}\n messages={messages}\n timeZone=\"Asia/Baghdad\"\n >\n {children}\n \u003C/NextIntlClientProvider>\n {process.env.NODE_ENV === \"development\" && \u003CReactQueryDevtools />}\n \u003C/Provider>\n {/* \u003C/TRPCProvider> */}\n \u003C/QueryClientProvider>\n );\n};\n\nexport default AppProvider;\n```\n\n**React Query**\n```typescript\nimport {\n defaultShouldDehydrateQuery,\n QueryClient,\n} from \"@tanstack/react-query\";\nimport SuperJSON from \"superjson\";\n\nexport const createQueryClient = () =>\n new QueryClient({\n defaultOptions: {\n queries: {\n // With SSR, we usually want to set some default staleTime\n // above 0 to avoid refetching immediately on the client\n staleTime: 360 * 1000,\n },\n dehydrate: {\n serializeData: SuperJSON.serialize,\n shouldDehydrateQuery: (query) =>\n defaultShouldDehydrateQuery(query) ||\n query.state.status === \"pending\",\n },\n hydrate: {\n deserializeData: SuperJSON.deserialize,\n },\n },\n });\n````\n\n**Page.tsx**\n```typescript\n\"use client\";\nimport { api } from \"@c/Provider\";\n// import { useTRPC } from \"@c/Provider\";\nimport { useSession } from \"@hwa/client\";\n// import { useQuery } from \"@tanstack/react-query\";\nimport { useRouter } from \"next/navigation\";\n\nconst Home = () => {\n const router = useRouter();\n const session = useSession();\n // const trpc = useTRPC();\n // const { data } = useQuery(trpc.message.getMessage.queryOptions());\n const { data } = api.message.getMessage.useQuery(); // message is undefined\n return (\n \u003Cdiv className=\"\">\n \u003Cp>{data}\u003C/p>\n \u003Cpre\n style={{\n padding: \"10px\",\n fontFamily: \"monospace\",\n whiteSpace: \"pre-wrap\",\n }}\n >\n {JSON.stringify(session, null, 2)}\n \u003C/pre>\n \u003Cbutton\n className=\"rounded border px-6 py-1\"\n onClick={() => router.refresh()}\n >\n Refresh\n \u003C/button>\n \u003C/div>\n );\n};\n\nexport default Home;\n\n```\n\n### Link to reproduction\n\nhttps://github.com/SamJbori/hwaTurbo\n\n### To reproduce\n\nCreate a split BE and FE with Turbo Repo\n\n### Additional information\n\n_No response_\n\n### 👨👧👦 Contributing\n\n- [ ] 🙋♂️ Yes, I'd be down to file a PR fixing this bug!",[3185],{"name":3173,"color":3174},6933,"bug: createTRPCReact return undefined routers on split FE/BE","2025-09-06T23:01:14Z","https://github.com/trpc/trpc/issues/6933",0.63393986,{"description":3192,"labels":3193,"number":3195,"owner":3176,"repository":3176,"state":3177,"title":3196,"updated_at":3197,"url":3198,"score":3199},"### Provide environment information\n\n``` \nSystem:\n OS: macOS 14.5\n CPU: (12) arm64 Apple M2 Max\n Memory: 73.41 MB / 32.00 GB\n Shell: 5.9 - /bin/zsh\n Binaries:\n Node: 20.18.0 - ~/.nvm/versions/node/v20.18.0/bin/node\n Yarn: 1.22.22 - ~/Library/pnpm/yarn\n npm: 10.8.2 - ~/.nvm/versions/node/v20.18.0/bin/npm\n Browsers:\n Chrome: 135.0.7049.117\n Edge: 134.0.3124.62\n Safari: 17.5\n npmPackages:\n @trpc/server: ^11.1.2 => 11.1.2 \n typescript: ^5.8.3 => 5.8.3 \n```\n\n### Describe the bug\n\nWhen using the documented pattern for defining a router (verbatim from https://trpc.io/docs/server/routers), TypeScript emits declaration files that include imports from `@trpc/server/dist/unstable-core-do-not-import`, which is not exposed via the package’s exports field.\n\nThis makes the generated `.d.ts` files invalid for consumers that rely on strict ESM resolution, including build tools and downstream libraries.\n\n### Link to reproduction\n\nhttps://github.com/extradosages/trpc-type-leak-demo\n\n### To reproduce\n\nUse the following `trpc.ts` and `router.ts` files (copied verbatim from the docs):\n\n`trcp.ts`\n```ts\nimport { initTRPC } from '@trpc/server';\nconst t = initTRPC.create();\nexport const router = t.router;\nexport const publicProcedure = t.procedure;\n```\n\n`router.ts`\n```ts\nimport { publicProcedure, router } from './trpc';\nconst appRouter = router({\n greeting: publicProcedure.query(() => 'hello tRPC v10!'),\n});\nexport type AppRouter = typeof appRouter;\n```\n\nRun:\n```bash\ntsc --emitDeclarationOnly\n```\n\nObserve that `router.d.ts` includes:\n```ts\ndeclare const appRouter: import(\"@trpc/server/dist/unstable-core-do-not-import\").BuiltRouter\u003C...>;\n```\n\nCompare to the `package.json` `exports` field:\n```json\n\"exports\": {\n \".\": {\n \"import\": \"./dist/index.mjs\",\n ...\n },\n ...\n \"./unstable-core-do-not-import\": {\n \"import\": \"./dist/unstable-core-do-not-import.mjs\",\n ...\n }\n}\n```\n\n### Additional information\n\nMight be solved by https://github.com/trpc/trpc/issues/5004.\n\nCurrently running a workaround in production with the following patch:\n```diff\ndiff --git a/package.json b/package.json\nindex 1f03d01bd1148bffc1434ac66f9feb52ba654bc3..f73cdbd446c2421a377af8ce0459288e1ee1162b 100644\n--- a/package.json\n+++ b/package.json\n@@ -73,6 +73,11 @@\n \"require\": \"./dist/adapters/ws.js\",\n \"default\": \"./dist/adapters/ws.js\"\n },\n+ \"./dist/*\": {\n+ \"import\": \"./dist/*\",\n+ \"require\": \"./dist/*\",\n+ \"default\": \"./dist/*\"\n+ },\n \"./http\": {\n \"import\": \"./dist/http.mjs\",\n \"require\": \"./dist/http.js\",\n```\n\n### 👨👧👦 Contributing\n\n- [ ] 🙋♂️ Yes, I'd be down to file a PR fixing this bug!",[3194],{"name":3173,"color":3174},6753,"bug: generated `.d.ts` files leaking un-exported types","2025-05-07T23:42:57Z","https://github.com/trpc/trpc/issues/6753",0.6492731,{"description":3201,"labels":3202,"number":3204,"owner":3176,"repository":3176,"state":3177,"title":3205,"updated_at":3206,"url":3207,"score":3208},"### Provide environment information\n\n```\r\n System:\r\n OS: macOS 14.4.1\r\n CPU: (8) arm64 Apple M1\r\n Memory: 62.41 MB / 16.00 GB\r\n Shell: 5.9 - /bin/zsh\r\n Binaries:\r\n Node: 20.10.0 - ~/.nvm/versions/node/v20.10.0/bin/node\r\n npm: 10.2.3 - ~/.nvm/versions/node/v20.10.0/bin/npm\r\n pnpm: 9.12.2 - ~/.nvm/versions/node/v20.10.0/bin/pnpm\r\n Browsers:\r\n Chrome: 130.0.6723.92\r\n Safari: 17.4.1\r\n npmPackages:\r\n @tanstack/react-query: ^5.59.19 => 5.59.19 \r\n @trpc/client: 11.0.0-rc.608 => 11.0.0-rc.608+f75de97b3 \r\n @trpc/react-query: 11.0.0-rc.608 => 11.0.0-rc.608+f75de97b3 \r\n react: ^18.3.1 => 18.3.1 \r\n typescript: ^5.6.3 => 5.6.3 \r\n```\n\n### Describe the bug\n\nI have a query which I just want to run in a certain condition (if another query had a non-empty result). I was trying to follow the docs (see https://trpc.io/docs/client/react/useQueries in conjunction with https://tanstack.com/query/v4/docs/framework/react/guides/dependent-queries#usequeries-dependent-query) but I could not get my code snippet to compile.\n\n### Link to reproduction\n\nhttps://stackblitz.com/edit/github-qa2kdy?file=src%2Fpages%2Findex.tsx\n\n### To reproduce\n\nChange the text in the variable `text` in line 10 of the `index.tsx`, and you'll see the error appear. To me the error only appeared after changing the text.\n\n### Additional information\n\nHere's the typescript error I get on the callback:\r\n\r\n```\r\nArgument of type '(t: UseQueriesProcedureRecord\u003C{ ctx: object; meta: object; errorShape: DefaultErrorShape; transformer: false; }, { greeting: QueryProcedure\u003C{ input: { name?: string | null | undefined; }; output: { text: string; }; }>; }>) => [] | [...]' is not assignable to parameter of type '(t: UseQueriesProcedureRecord\u003C{ ctx: object; meta: object; errorShape: DefaultErrorShape; transformer: false; }, { greeting: QueryProcedure\u003C{ input: { name?: string | null | undefined; }; output: { text: string; }; }>; }>) => readonly []'.\r\n Type '[] | [TrpcQueryOptionsForUseQueries\u003C{ text: string; }, { text: string; }, TRPCClientError\u003C{ ctx: object; meta: object; errorShape: DefaultErrorShape; transformer: false; }>>]' is not assignable to type 'readonly []'.\r\n Type '[TrpcQueryOptionsForUseQueries\u003C{ text: string; }, { text: string; }, TRPCClientError\u003C{ ctx: object; meta: object; errorShape: DefaultErrorShape; transformer: false; }>>]' is not assignable to type 'readonly []'.\r\n Source has 1 element(s) but target allows only 0.(2345)\r\n```\n\n### 👨👧👦 Contributing\n\n- [ ] 🙋♂️ Yes, I'd be down to file a PR fixing this bug!",[3203],{"name":3173,"color":3174},6188,"bug: React: Types for callback of `trpc.useQueries` doesn't allow returning an empty array","2025-03-20T15:42:41Z","https://github.com/trpc/trpc/issues/6188",0.6586306,{"description":3210,"labels":3211,"number":3213,"owner":3176,"repository":3176,"state":3177,"title":3214,"updated_at":3215,"url":3216,"score":3217},"### Provide environment information\n\n@trpc/tanstack-react-query@11.5.0\n\n### Describe the bug\n\nmoving from `trpc...useSuspenseQuery()` to `useSuspenseQuery(trpc...queryOptions())` removes the type inference of suspense queries since now everything is in `queryOptions`.\n\nthere are some wrong typing, typically the `enabled` flag does not exist in suspenses [as it is mentioned on tanstack's docs](https://arc.net/l/quote/fjjaljss). doc also mentions `placeholderData` does not exist as well.\n\nbut both this props are available in `queryOptions()`\n\n### Link to reproduction\n\nexample.com\n\n### To reproduce\n\n```ts\nuseSuspenseQuery(\n trpc.my.query.queryOptions(undefined, { enabled: false, placeholderData: f => f })\n)\n```\n\n\u003Cimg width=\"417\" height=\"161\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/f3a113d4-ef73-406d-b837-afa149cce84e\" />\n\n### Additional information\n\n_No response_\n\n### 👨👧👦 Contributing\n\n- [ ] 🙋♂️ Yes, I'd be down to file a PR fixing this bug!",[3212],{"name":3173,"color":3174},6924,"bug: wrong types in the new trpc react-query client","2025-09-03T09:28:51Z","https://github.com/trpc/trpc/issues/6924",0.66206807,{"description":3219,"labels":3220,"number":3221,"owner":3176,"repository":3176,"state":3222,"title":3223,"updated_at":3224,"url":3225,"score":3226},"### Provide environment information\r\n\r\n```\r\n\r\n System:\r\n OS: macOS 12.5.1\r\n CPU: (8) arm64 Apple M1\r\n Memory: 157.83 MB / 16.00 GB\r\n Shell: 5.8.1 - /bin/zsh\r\n Binaries:\r\n Node: 16.17.0 - ~/.nvm/versions/node/v16.17.0/bin/node\r\n Yarn: 1.22.19 - /opt/homebrew/bin/yarn\r\n npm: 8.19.1 - ~/.nvm/versions/node/v16.17.0/bin/npm\r\n Watchman: 2022.09.12.00 - /opt/homebrew/bin/watchman\r\n Browsers:\r\n Brave Browser: 106.1.44.105\r\n Chrome: 105.0.5195.125\r\n Firefox: 105.0.1\r\n Safari: 16.0\r\n npmPackages:\r\n @trpc/react: ^10.0.0-proxy-beta.15 => 10.0.0-proxy-beta.15\r\n react: 18.0.0 => 18.0.0 \r\n typescript: ~4.7.4 => 4.7.4 \r\n\r\n```\r\n\r\n### Describe the bug\r\n\r\nIf I create a trpc react proxy and client like:\r\n\r\n```typescript\r\nexport const trpc = createTRPCReact\u003CUserRouter>()\r\nexport const trpcClient: TRPCClient\u003CUserRouter> = trpc.createClient({\r\n links: [\r\n httpBatchLink({\r\n url: \"http://localhost:3000/user\"\r\n }),\r\n ],\r\n})\r\n```\r\n\r\nAnd try to use the `trpcClient` directly, it does not have the correct types:\r\n\r\n```typescript\r\n const createAccountResult = await trpcClient.mutation(\"account.create\")\r\n```\r\n\r\nWill return: `TS2345: Argument of type 'string' is not assignable to parameter of type 'never'.`\r\n\r\n### Link to reproduction\r\n\r\nhttps://stackblitz.com/github/trpc/examples-next-minimal-starter\r\n\r\n### To reproduce\r\n\r\nSee above\r\n\r\n### Additional information\r\n\r\n_No response_\r\n\r\n### 👨👧👦 Contributing\r\n\r\n- [X] 🙋♂️ Yes, I'd be down to file a PR fixing this bug!",[],2922,"closed","bug: `TRPCClient` from `createTRPCReact\u003CRouterType>().createClient` is incorrectly typed","2022-10-05T23:29:07Z","https://github.com/trpc/trpc/issues/2922",0.6199641,{"description":3228,"labels":3229,"number":3243,"owner":3176,"repository":3176,"state":3222,"title":3244,"updated_at":3245,"url":3246,"score":3247},"### Provide environment information\n\n```\nSystem:\n OS: macOS 15.1.1\n CPU: (10) arm64 Apple M1 Max\n Memory: 1.83 GB / 32.00 GB\n Shell: 5.9 - /bin/zsh\n Binaries:\n Node: 21.7.1 - ~/.nvm/versions/node/v21.7.1/bin/node\n Yarn: 1.22.22 - /opt/homebrew/bin/yarn\n npm: 10.5.0 - ~/.nvm/versions/node/v21.7.1/bin/npm\n Browsers:\n Chrome: 132.0.6834.160\n Safari: 18.1.1\n npmPackages:\n @tanstack/react-query: ^5.24.1 => 5.65.1 \n @trpc/client: 11.0.0-rc.730 => 11.0.0-rc.730+776d07336 \n @trpc/next: 11.0.0-rc.730 => 11.0.0-rc.730+776d07336 \n @trpc/react-query: 11.0.0-rc.730 => 11.0.0-rc.730+776d07336 \n @trpc/server: 11.0.0-rc.730 => 11.0.0-rc.730+776d07336 \n next: 14.2.3 => 14.2.3 \n react: 18.2.0 => 18.2.0 \n typescript: ^5.7.2 => 5.7.3 \n```\n\n### Describe the bug\n\nHello, and thank you for all your great work on this. We have run into a mysterious issue, that was initially a copy of https://github.com/trpc/trpc/issues/6374. We had initialized our `react-query` and tRPC clients per the [official docs](https://trpc.io/docs/client/react/setup), but were also using a `useEffect` to update some items used in our tRPC headers.\n\nWe removed the `useEffect` (as the headers are an `async` function anyway), and the untyped client error went away. However, we are now seeing `TRPCClientError: Headers is not defined`, although logging the headers in our React Native `AppContainer` component shows all the headers with values as expected.\n\nHere is our AppContainer:\n\n```ts\nconst AppContainer = () => {\n const [userID, setUserID] = useState('')\n\n // Navigation refs\n const navigationRef = useNavigationContainerRef\u003CRootStackParamList>()\n const routeNameRef = useRef\u003Cstring>()\n\n // Cached resources and color scheme\n const trpcUrl = useSessionStore((state) => state.trpcUrl)\n const userId = useSessionStore((state) => state.userId)\n\n // Device info\n const deviceBrand = Device.brand\n const deviceOS = Device.osName\n const deviceOSVersion = Device.osVersion\n const deviceModel = Device.modelName\n\n // tRPC and query clients\n const queryClient = new QueryClient()\n const [trpcClient] = useState(() =>\n trpc.createClient({\n links: [\n loggerLink({\n enabled: (opts) =>\n (process.env.NODE_ENV === 'development' && typeof window !== 'undefined') ||\n (opts.direction === 'down' && opts.result instanceof Error),\n console: {\n log: () => {\n // noop\n },\n error: (...args) => {\n logTrpcError(args)\n },\n },\n }),\n httpLink({\n url: trpcUrl,\n headers: async () => {\n // From AsyncStorage\n const customToken = await getItem('customToken')\n\n return {\n 'app-version': version,\n 'content-type': 'application/json',\n 'device-brand': deviceBrand || 'unknown',\n 'device-model': deviceModel || 'unknown',\n 'device-os-version': deviceOSVersion || 'unknown',\n 'device-os': deviceOS || 'unknown',\n 'custom-token': customToken || 'anonymous',\n 'user-id': userId || 'anonymous',\n }\n },\n }),\n ],\n }),\n )\n\n return (\n \u003Ctrpc.Provider client={trpcClient} queryClient={queryClient}>\n \u003CQueryClientProvider client={queryClient}>\n ...\n \u003C/QueryClientProvider>\n \u003C/trpc.Provider>\n )\n}\n```\n\nWe do not require any SSR in our project. Thank you very much for your time!\n\n### Link to reproduction\n\nN/A\n\n### To reproduce\n\nUnsure how to reproduce.\n\n### Additional information\n\n_No response_\n\n### 👨👧👦 Contributing\n\n- [ ] 🙋♂️ Yes, I'd be down to file a PR fixing this bug!",[3230,3233,3236,3239,3240],{"name":3231,"color":3232},"🙋♂️ help wanted","008672",{"name":3234,"color":3235},"👻 invalid","e4e669",{"name":3237,"color":3238},"⏮ needs reproduction","000055",{"name":3173,"color":3174},{"name":3241,"color":3242},"⏳ close if no activity","d4c5f9",6449,"bug: TRPCClientError \"Headers is not defined\"","2025-02-13T00:07:21Z","https://github.com/trpc/trpc/issues/6449",0.6354187,{"description":3249,"labels":3250,"number":3251,"owner":3176,"repository":3176,"state":3222,"title":3252,"updated_at":3253,"url":3254,"score":3255},"### Provide environment information\r\n\r\n``` \r\nSystem:\r\n OS: macOS 12.2.1\r\n CPU: (10) arm64 Apple M1 Max\r\n Memory: 131.52 MB / 32.00 GB\r\n Shell: 3.2.57 - /bin/bash\r\n Binaries:\r\n Node: 18.8.0 - ~/.local/share/nvm/v18.8.0/bin/node\r\n Yarn: 1.22.19 - ~/.local/share/nvm/v18.8.0/bin/yarn\r\n npm: 8.18.0 - ~/.local/share/nvm/v18.8.0/bin/npm\r\n Browsers:\r\n Chrome: 106.0.5249.103\r\n Firefox: 105.0.2\r\n Safari: 15.3\r\n npmPackages:\r\n @trpc/client: ^10.0.0-proxy-beta.17 => 10.0.0-proxy-beta.17\r\n```\r\n\r\n\r\n### Describe the bug\r\n\r\nTypescript can't complete the typing of a query, see discussion https://github.com/trpc/trpc/discussions/2963\r\n\r\n\r\n`Property 'subscribe' does not exist on type 'DecoratedProcedureRecord\u003Cunknown, BuildProcedure\u003C\"subscription\", { _config: RootConfig\u003C{ ctx: {}; meta: {}; errorShape: never; transformer: CombinedDataTransformer; }>; _ctx_out: {}; _input_in: unique symbol; _input_out: unique symbol; _output_in: u\r\n nique symbol; _output_out: unique symbol; _meta: {}; }, Observable\u003C....'.`\r\n\r\n### Link to reproduction\r\n\r\nhttps://github.com/Lilja/trpc-v10-server-needed\r\n\r\n### To reproduce\r\n\r\nOpen up `src/index.ts` and modify the `type {AppRouter}` import, point it to the trpc repo OR a another router.\r\n\r\n### Additional information\r\n\r\n_No response_\r\n\r\n### 👨👧👦 Contributing\r\n\r\n- [ ] 🙋♂️ Yes, I'd be down to file a PR fixing this bug!",[],2972,"bug: @trpc/server needed in the frontend for types to work","2022-10-11T08:18:00Z","https://github.com/trpc/trpc/issues/2972",0.63569885,{"description":3257,"labels":3258,"number":3259,"owner":3176,"repository":3176,"state":3222,"title":3260,"updated_at":3261,"url":3262,"score":3263},"### Provide environment information\r\n\r\n```\r\n System:\r\n OS: Windows 10 10.0.22000\r\n CPU: (24) x64 AMD Ryzen 9 3900X 12-Core Processor\r\n Memory: 3.32 GB / 15.93 GB\r\n Binaries:\r\n Node: 16.16.0 - ~\\scoop\\apps\\nodejs-lts\\current\\node.EXE\r\n npm: 8.15.1 - ~\\scoop\\apps\\nodejs-lts\\current\\bin\\npm.CMD\r\n Browsers:\r\n Edge: Spartan (44.22000.120.0), Chromium (104.0.1293.47)\r\n Internet Explorer: 11.0.22000.120\r\n npmPackages:\r\n @trpc/client: ^10.0.0-alpha.45 => 10.0.0-alpha.45\r\n @trpc/server: ^10.0.0-alpha.45 => 10.0.0-alpha.45\r\n```\r\n\r\n### Describe the bug\r\n\r\nThis is on experimental version `10.0.0-alpha.45`\r\n\r\nTRPCClientError's data property is of `any` type, but it should be typed to `DefaultErrorData`, which will type the values `code`, `httpStatus`, `stack`, and `path`.\r\n\r\n### To reproduce\r\n\r\nIn query procedure:\r\n`throw new TRPCError({ code: \"NOT_FOUND\", message: \"Article not found.\" });`\r\n\r\nClient call:\r\n```\r\n try {\r\n const article = await trpcClient(fetch).article.get.query({ slug: \"slug-that-does-not-exist\" });\r\n } catch (error) {\r\n if (error instanceof TRPCClientError) {\r\n return { status: error.data.httpStatus, error }; // Typescript error: \"Unsafe member access .httpStatus on an `any` value.\"\r\n }\r\n }\r\n```\r\n\r\n### Additional information\r\n\r\nWorkaround: `(error.data as DefaultErrorData)`\r\n\r\nI'm working on setting up the Fetch adapter with SvelteKit. As the response is not available in the context prior to resolving unlike Next.js, the error has to be caught in the page Load function and converted to the correct status code for SvelteKit to handle the error. As an aside, SvelteKit does plan to make substantial changes around pages and Load function in the future, so this solution might change.\r\n\r\n### 👨👧👦 Contributing\r\n\r\n- [ ] 🙋♂️ Yes, I'd be down to file a PR fixing this bug!",[],2442,"bug: TRPCClientError data prop not typed","2022-08-16T07:34:10Z","https://github.com/trpc/trpc/issues/2442",0.64538974,{"description":3265,"labels":3266,"number":3268,"owner":3176,"repository":3176,"state":3222,"title":3269,"updated_at":3270,"url":3271,"score":3272},"### Provide environment information\n\n```\n System:\n OS: macOS 26.0\n CPU: (16) arm64 Apple M4 Max\n Memory: 4.70 GB / 128.00 GB\n Shell: 5.9 - /bin/zsh\n Binaries:\n Node: 22.16.0 - ~/.nvm/versions/node/v22.16.0/bin/node\n Yarn: 4.9.2 - ~/.nvm/versions/node/v22.16.0/bin/yarn\n npm: 10.9.2 - ~/.nvm/versions/node/v22.16.0/bin/npm\n bun: 1.2.0 - ~/.bun/bin/bun\n Watchman: 2025.05.26.00 - /opt/homebrew/bin/watchman\n Browsers:\n Brave Browser: 137.1.79.119\n Chrome: 137.0.7151.104\n Edge: 137.0.3296.68\n Safari: 19.0\n npmPackages:\n @tanstack/react-query: ^5.80.7 => 5.80.7 \n @trpc/client: ^11.4.0 => 11.4.0 \n @trpc/next: ^11.4.0 => 11.4.0 \n @trpc/react-query: ^11.4.0 => 11.4.0 \n @trpc/server: ^11.4.0 => 11.4.0 \n next: 15.3.3 => 15.3.3 \n react: 19.0.0 => 19.0.0 \n typescript: ^5.8.3 => 5.8.3 \n```\n\n### Describe the bug\n\nThe latest version of trpc includes imports of \"@trpc/server/unstable-core-do-not-import\" from within \"@trpc/react-query\" (specifically in shared.mjs).\n\nThis causes react native to fail, as @trpc/server has async generators, which cannot be bundled by metro. \n\n\n```\nFailed to generate Hermes bytecode for: /Users/jonlucadecaro/Documents/Other/weights/expo/main.ts\n\n/var/folders/91/r37rnk8d50s2lss5kgx3cknm0000gn/T/expo-bundler-0.9279404147480788-1749770490137/index.js:224213:30: error: async generators are unsupported\n return registerAsync(async function* (idx) {\n ^~~~~~~~~~~~~~~~~~~~~~~\n/var/folders/91/r37rnk8d50s2lss5kgx3cknm0000gn/T/expo-bundler-0.9279404147480788-1749770490137/index.js:224240:30: error: async generators are unsupported\n return registerAsync(async function* (idx) {\n ^~~~~~~~~~~~~~~~~~~~~~~\nError: /Users/jonlucadecaro/Documents/Other/weights/node_modules/react-native/sdks/hermesc/osx-bin/hermesc -emit-binary -out /var/folders/91/r37rnk8d50s2lss5kgx3cknm0000gn/T/expo-bundler-0.9279404147480788-1749770490137/index.hbc /var/folders/91/r37rnk8d50s2lss5kgx3cknm0000gn/T/expo-bundler-0.9279404147480788-1749770490137/index.js -O -output-source-map exited with non-zero code: 2\n```\n\nThis is specifically referencing:\n\n```ts\nasync function* createBatchStreamProducer(\n opts: JSONLProducerOptions,\n): AsyncIterable\u003CHead | ChunkData | typeof PING_SYM, void> {\n const { data } = opts;\n let counter = 0 as ChunkIndex;\n const placeholder = 0 as PlaceholderValue;\n\n const mergedIterables = mergeAsyncIterables\u003CChunkData>();\n function registerAsync(\n callback: (idx: ChunkIndex) => AsyncIterable\u003CChunkData, void>,\n ) {\n const idx = counter++ as ChunkIndex;\n\n const iterable = callback(idx);\n mergedIterables.add(iterable);\n\n return idx;\n }\n```\n\nin the file: `src/unstable-core-do-not-import/stream/jsonl.ts`\n\n### Link to reproduction\n\nhttps://github.com/t3-oss/create-t3-turbo - try this repo with v11.4.0\n\n### To reproduce\n\nRun `npx expo export --dump-sourcemap --platform ios` on an expo project with trpc v11.4.0\n\n### Additional information\n\nIn general, should @trpc/client or @trpc/react-query be importing from @trpc/server? Should those imports not be reserved for exclusively server side use?\n\n### 👨👧👦 Contributing\n\n- [ ] 🙋♂️ Yes, I'd be down to file a PR fixing this bug!",[3267],{"name":3173,"color":3174},6823,"bug: v11.4.0 cannot be bundled using react native","2025-06-18T12:19:21Z","https://github.com/trpc/trpc/issues/6823",0.64821315,["Reactive",3274],{},["Set"],["ShallowReactive",3277],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fymWFI6AR61PG5_Td3zpIXAmVprqLqNmIqlL65hjAoAQ":-1},"/trpc/trpc/2718"]