\n \u003C/HydrateClient>\n );\n};\n\nexport default Page;\n```\nAll is working on local development is perfect. But when I try to build it-\n\n```\nError occurred prerendering page \"/unavailability\". Read more: https://nextjs.org/docs/messages/prerender-error\nTRPCClientError: Unauthorized request. Please login\n at s.from (/vercel/path0/.next/server/chunks/949.js:3:83107)\n at /vercel/path0/.next/server/chunks/949.js:3:89907\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\nExport encountered an error on /(dashboard)/unavailability/page: /unavailability, exiting the build.\n ⨯ Static worker exited with code: 1 and signal: null\n ELIFECYCLE Command failed with exit code 1.\nError: Command \"pnpm run build\" exited with 1\n\n```\n\n\nSo, it is natural that on build time, there is no authentications. But it stopping to build it-\n\n\n\n\n### Link to reproduction\n\nhttps://github.com/wegreet/dashboard-new-design\n\n### To reproduce\n\nJust build it with vercel\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!",[3225,3228],{"name":3226,"color":3227},"👻 invalid","e4e669",{"name":3173,"color":3174},6441,"bug: TRPC with nextjs 15(App Router) production build failed!","2025-02-05T17:24:47Z","https://github.com/trpc/trpc/issues/6441",0.63992596,{"description":3235,"labels":3236,"number":3241,"owner":3176,"repository":3176,"state":3186,"title":3242,"updated_at":3243,"url":3244,"score":3245},"### Provide environment information\r\n\r\n```\r\n System:\r\n OS: Linux 5.15 Manjaro Linux\r\n CPU: (12) x64 AMD Ryzen 5 4600H with Radeon Graphics\r\n Memory: 7.99 GB / 15.05 GB\r\n Container: Yes\r\n Shell: 5.1.16 - /bin/bash\r\n Binaries:\r\n Node: 16.15.0 - ~/.nvm/versions/node/v16.15.0/bin/node\r\n Yarn: 1.22.18 - ~/.nvm/versions/node/v16.15.0/bin/yarn\r\n npm: 8.5.5 - ~/.nvm/versions/node/v16.15.0/bin/npm\r\n Browsers:\r\n Firefox: 105.0.3\r\n npmPackages:\r\n @tanstack/react-query: ^4.13.0 => 4.13.0 \r\n @trpc/client: ^10.0.0-rc.1 => 10.0.0-rc.1 \r\n @trpc/react-query: ^10.0.0-rc.1 => 10.0.0-rc.1 \r\n @trpc/server: ^10.0.0-rc.1 => 10.0.0-rc.1 \r\n react: 17.0.1 => 17.0.1 \r\n typescript: ~4.3.5 => 4.3.5 \r\n```\r\n\r\n### Describe the bug\r\n\r\nIt is currently not possible to run `@trpc/react-query` with TypeScript versions older than 4.5 ([see TS changelog](https://devblogs.microsoft.com/typescript/announcing-typescript-4-5/#type-on-import-names)). Upgrading to 4.5 fixes this issue.\r\n\r\nThe following is thrown when running `tsc` on TS 4.3:\r\n\r\n\r\n\r\n### Link to reproduction\r\n\r\nhttps://stackblitz.com/edit/github-pe2txe?file=src/main.ts\r\n\r\n### To reproduce\r\n\r\n1. Open the reproduction link\r\n2. Run `npm run tsc`\r\n3. See error\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!",[3237,3240],{"name":3238,"color":3239},"📚 documentation / examples","0075ca",{"name":3226,"color":3227},3088,"bug: @trpc/react-query breaks in typescript \u003C 4.5","2022-12-09T12:02:03Z","https://github.com/trpc/trpc/issues/3088",0.640333,{"description":3247,"labels":3248,"number":3249,"owner":3176,"repository":3176,"state":3186,"title":3250,"updated_at":3251,"url":3252,"score":3253},"### 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.64325166,{"description":3255,"labels":3256,"number":3258,"owner":3176,"repository":3176,"state":3186,"title":3259,"updated_at":3260,"url":3261,"score":3262},"### Provide environment information\n\n```\n System:\n OS: Linux 6.8 Debian GNU/Linux 12 (bookworm) 12 (bookworm)\n CPU: (16) x64 AMD Ryzen 7 5800X 8-Core Processor\n Memory: 21.97 GB / 31.34 GB\n Container: Yes\n Shell: 5.2.15 - /bin/bash\n Binaries:\n Node: 20.19.0 - /usr/local/bin/node\n Yarn: 1.22.22 - /usr/local/bin/yarn\n npm: 10.8.2 - /usr/local/bin/npm\n pnpm: 10.4.1 - /usr/local/share/npm-global/bin/pnpm\n npmPackages:\n @tanstack/react-query: ^5.66.0 => 5.66.0 \n @trpc/client: 11.0.0 => 11.1.1 \n @trpc/server: 11.0.0 => 11.1.1 \n react: 19.1.0 => 18.3.1 \n typescript: 5.7.3 => 5.7.3 \n```\n\n### Describe the bug\n\nVersions of @tanstack/react-query above v5.66.0 breaks typing for the return type of getQueriesData.\n\nQuery\n```ts\nconst data = qc.getQueriesData(trpc.productionJob.getAllWithLocationInfinite.infiniteQueryFilter());\n```\n\nv5.74.7\n```ts\n(method) QueryClient.getQueriesData\u003Cunknown, any>(filters: any): [readonly unknown[], unknown][]\n```\n\nv5.66.0\n```ts\n(method) QueryClient.getQueriesData\u003Cunknown, WithRequired\u003CQueryFilters\u003CTRPCInfiniteData\u003C{\n cursor: number;\n locationId?: string | undefined;\n searchTerm?: string | undefined;\n showCompleted?: boolean | undefined;\n showScannedJobsOnly?: boolean | undefined;\n showHighPriorityOnly?: boolean | undefined;\n showProjectType?: \"project\" | ... 2 more ... | undefined;\n projectName?: string | undefined;\n sort?: {\n ...;\n }[] | ... 1 more ... | undefined;\n limit: number;\n}, WithPagination\u003C...>>, TRPCClientErrorLike\u003C...>, TRPCInfiniteData\u003C...>, TRPCQueryKey & {\n ...;\n}>, \"queryKey\">, TRPCInfiniteData\u003C...>>(filters: WithRequired\u003C...>): [...][]\n```\n\n### Link to reproduction\n\nhttps://stackblitz.com/edit/github-gmrngrft?file=src%2Fpages%2Findex.tsx\n\n### To reproduce\n\nCheck the type in repo for `qc.getQueriesData`.\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!",[3257],{"name":3173,"color":3174},6730,"bug: TanStack Query above 5.66.0 breaks data return types","2025-04-29T06:37:45Z","https://github.com/trpc/trpc/issues/6730",0.64385086,{"description":3264,"labels":3265,"number":3268,"owner":3176,"repository":3176,"state":3186,"title":3269,"updated_at":3270,"url":3271,"score":3272},"### Provide environment information\n\napi client:\n\n```\n System:\n OS: macOS 15.5\n CPU: (8) arm64 Apple M3\n Memory: 127.13 MB / 16.00 GB\n Shell: 5.9 - /bin/zsh\n Binaries:\n Node: 22.18.0 - ~/.nvm/versions/node/v22.18.0/bin/node\n Yarn: 1.22.22 - /opt/homebrew/bin/yarn\n npm: 10.9.3 - ~/.nvm/versions/node/v22.18.0/bin/npm\n pnpm: 10.10.0 - ~/Library/pnpm/pnpm\n Watchman: 2025.06.23.00 - /opt/homebrew/bin/watchman\n Browsers:\n Chrome: 139.0.7258.128\n Safari: 18.5\n npmPackages:\n @trpc/client: 11.4.4 => 11.4.4\n @trpc/server: 11.4.4 => 11.4.4\n typescript: ^5.0.0 => 5.8.3\n```\n\napi:\n\n```\n System:\n OS: macOS 15.5\n CPU: (8) arm64 Apple M3\n Memory: 111.27 MB / 16.00 GB\n Shell: 5.9 - /bin/zsh\n Binaries:\n Node: 22.18.0 - ~/.nvm/versions/node/v22.18.0/bin/node\n Yarn: 1.22.22 - /opt/homebrew/bin/yarn\n npm: 10.9.3 - ~/.nvm/versions/node/v22.18.0/bin/npm\n pnpm: 10.10.0 - ~/Library/pnpm/pnpm\n Watchman: 2025.06.23.00 - /opt/homebrew/bin/watchman\n Browsers:\n Chrome: 139.0.7258.128\n Safari: 18.5\n npmPackages:\n @trpc/server: ^11.4.2 => 11.4.4\n typescript: ^5.0.0 => 5.8.3\n\n```\n\nbackend:\n```\n\n System:\n OS: macOS 15.5\n CPU: (8) arm64 Apple M3\n Memory: 103.20 MB / 16.00 GB\n Shell: 5.9 - /bin/zsh\n Binaries:\n Node: 22.18.0 - ~/.nvm/versions/node/v22.18.0/bin/node\n Yarn: 1.22.22 - /opt/homebrew/bin/yarn\n npm: 10.9.3 - ~/.nvm/versions/node/v22.18.0/bin/npm\n pnpm: 10.10.0 - ~/Library/pnpm/pnpm\n Watchman: 2025.06.23.00 - /opt/homebrew/bin/watchman\n Browsers:\n Chrome: 139.0.7258.128\n Safari: 18.5\n npmPackages:\n @trpc/server: ^11.4.4 => 11.4.4\n typescript: ^5.8.3 => 5.8.3\n\n```\n\n### Describe the bug\n\n## Setup\n\n- tRPC backend with a streaming endpoint (mutation procedure with an async iterator) and zod validation (v4.0.17)\n- backend is hosted via express (`@trpc/server/adapters/express`), and hosting it with hono resulted in the same issue\n- tRPC client uses `httpBatchStreamlink` to make requests to said endpoint within in a node.js runtime environment\n- the client makes requests with \"large payloads\" (e.g 2mb)\n\n### Client setup\n```ts\nexport function createNodeApiClient(\n options: TRPCClientOptions = {},\n): TRPCClient\u003CAppRouter> {\n const { baseUrl = process.env.API_URL, headers = {} } = options;\n\n return createTRPCProxyClient\u003CAppRouter>({\n links: [\n httpBatchStreamLink({\n maxItems: 1,\n url: `${baseUrl}/trpc`,\n headers: () => ({\n 'Content-Type': 'application/json',\n ...headers,\n }),\n transformer: superjson,\n }),\n ],\n });\n}\n```\n\n### The Issue\nOn _some_ requests, the response stream is aborted prematurely, even before the procedure code starts to execute (also mutations that return immediately fail with the same error, before execution). Weirdly, a request with the **exact same payload and the exact same setup** would **sometimes abort and sometimes succeed.** \n\n**On aborted requests**, the server would respond with a **\"Connection: close\"** header and only include the first line of the response: \n\u003Cimg width=\"459\" height=\"317\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/33787f80-201c-4956-adac-00e1498f8c64\" />\n\n**Whereas for successful requests** the response includes **\"Connection: keep-alive\"** and it will receive the full stream content:\n\u003Cimg width=\"561\" height=\"277\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/701b1136-38dd-4fec-9e92-3ed2086099f9\" />\n\n### Exception stack trace\n```\nsystem\nchained-exception\nexception\nstack-trace\nframe\nmodulenode:_http_server\nfunctionabortIncoming\nframe\nmodulenode:_http_server\nfunctionsocketOnClose\n\nshow 1 similar\nframe\nmodulenode:net\nframe\nmoduleasync_hooks\nfunction (trimmed javascript function)callbackTrampoline\ntypeError\nexception\nstack-trace\nframe\nmodule@trpc.server.dist:resolveResponse-9SiPu2EM\ncontext-linethrow new require_tracked.TRPCError({\nframe\nmoduletask_queues\nfunction (trimmed javascript function)processTicksAndRejections\nframe\nmodule@trpc.server.dist:resolveResponse-9SiPu2EM\nfunction (trimmed javascript function)read\ncontext-linevalue = await promise;\nframe\nmodule@trpc.server.dist:resolveResponse-9SiPu2EM\nfunctiongetRawInput\ncontext-lineconst inputs = await getInputs.read();\nframe\nmodule@sentry.core.build.esm:trpc\ncontext-lineconst rawRes = await getRawInput();\nframe\nmodule@trpc.server.dist:initTRPC-XuvQcOiC\nfunctioncallRecursive\nframe\nmoduletrpc\ncontext-linereturn await next({ ctx });\nframe\nmodule@trpc.server.dist:initTRPC-XuvQcOiC\nfunctioncallRecursive\nframe\nmodule@trpc.server.dist:initTRPC-XuvQcOiC\nfunctionprocedure\ncontext-lineconst result = await callRecursive(0, _def, opts);\ntypeTRPCError\n```\n\n### Raw Stack Trace\n```\nError: aborted\n File \"node:_http_server\", line 805, col 17, in abortIncoming\n File \"node:_http_server\", line 799, col 3, in socketOnClose\n File \"node:events\", line 530, col 35, in Socket.emit\n File \"node:net\", line 343, col 12, in TCP.?\n File \"node:internal/async_hooks\", line 130, col 17, in TCP.callbackTrampoline\nTRPCError: aborted\n File \"/app/node_modules/.pnpm/@trpc+server@11.4.4_typescript@5.8.3/node_modules/@trpc/server/dist/resolveResponse-9SiPu2EM.cjs\", line 53, col 11\n throw new require_tracked.TRPCError({\n File \"node:internal/process/task_queues\", line 105, col 5, in process.processTicksAndRejections\n File \"/app/node_modules/.pnpm/@trpc+server@11.4.4_typescript@5.8.3/node_modules/@trpc/server/dist/resolveResponse-9SiPu2EM.cjs\", line 59, col 12, in Object.read\n value = await promise;\n File \"/app/node_modules/.pnpm/@trpc+server@11.4.4_typescript@5.8.3/node_modules/@trpc/server/dist/resolveResponse-9SiPu2EM.cjs\", line 103, col 21, in getRawInput\n const inputs = await getInputs.read();\n File \"/app/node_modules/.pnpm/@sentry+core@10.5.0/node_modules/@sentry/core/build/esm/trpc.js\", line 54, col 26\n const rawRes = await getRawInput();\n File \"/app/node_modules/.pnpm/@trpc+server@11.4.4_typescript@5.8.3/node_modules/@trpc/server/dist/initTRPC-XuvQcOiC.mjs\", line 256, col 18, in callRecursive\n const result = await middleware((0, import_objectSpread2$1.default)((0, import_objectSpread2$1.default)({}, opts), {}, {\n File \"/app/node_modules/.pnpm/@trpc+server@11.4.4_typescript@5.8.3/node_modules/@trpc/server/dist/initTRPC-XuvQcOiC.mjs\", line 256, col 18, in callRecursive\n const result = await middleware((0, import_objectSpread2$1.default)((0, import_objectSpread2$1.default)({}, opts), {}, {\n File \"/app/packages/api/dist/trpc.js\", line 31, col 16\n return await next({ ctx });\n File \"/app/node_modules/.pnpm/@trpc+server@11.4.4_typescript@5.8.3/node_modules/@trpc/server/dist/initTRPC-XuvQcOiC.mjs\", line 256, col 18, in callRecursive\n const result = await middleware((0, import_objectSpread2$1.default)((0, import_objectSpread2$1.default)({}, opts), {}, {\n File \"/app/node_modules/.pnpm/@trpc+server@11.4.4_typescript@5.8.3/node_modules/@trpc/server/dist/initTRPC-XuvQcOiC.mjs\", line 281, col 18, in procedure\n const result = await callRecursive(0, _def, opts);\n```\n\n\u003Cimg width=\"481\" height=\"797\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/0dd006b0-5218-4391-b3f2-34529429a0b5\" />\n\n### Important observations:\n- The issue **ONLY happens with a deployed backend** (it never happened when the backend ran locally)\n- **Raw `curl` requests ALWAYS work** (also with the exact same headers and body), while using a node-client with the httpBatchStreamLink _sometimes_ fails (at ~50% fail rate)\n- Only ~5-10% of the requests to the backend are *failure candidates* (which means that their request body _could_ lead to a failure)\n- With those _failure candidates_, only ~50% of the requests fail\n\nAfter a bit of debugging, it seemed like there is some race condition where an internal trpc abort controller would sometimes abort the request.\n\nI'd love to have support here since this issue already nags me for 2 days - and not being able to reproduce it (locally) makes it very hard to debug! \n\nMaybe you guys have a gut feel?\n\nThanks in advance!\n\n### Link to reproduction\n\nUnfortunately not able to.. reproduction requires a hosted backend for me.\n\n### To reproduce\n\nsee above\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!",[3266,3267],{"name":3211,"color":3212},{"name":3173,"color":3174},6896,"bug: httpBatchStreamLink (occasionally) closes stream prematurely","2025-09-07T18:27:18Z","https://github.com/trpc/trpc/issues/6896",0.6466823,["Reactive",3274],{},["Set"],["ShallowReactive",3277],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$f5nAPsvT_4nxUjKK7JkjOmIxDZeF7q5HkQbeIdTfDe30":-1},"/trpc/trpc/3971"]