}\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!",[3188],{"name":3176,"color":3177},6933,"bug: createTRPCReact return undefined routers on split FE/BE","2025-09-06T23:01:14Z","https://github.com/trpc/trpc/issues/6933",0.75849944,{"description":3195,"labels":3196,"number":3198,"owner":3179,"repository":3179,"state":3180,"title":3199,"updated_at":3200,"url":3201,"score":3202},"### 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!",[3197],{"name":3176,"color":3177},6753,"bug: generated `.d.ts` files leaking un-exported types","2025-05-07T23:42:57Z","https://github.com/trpc/trpc/issues/6753",0.76173884,{"description":3204,"labels":3205,"number":3210,"owner":3179,"repository":3179,"state":3211,"title":3212,"updated_at":3213,"url":3214,"score":3215},"### Provide environment information\n\n```\n System:\n OS: macOS 15.3.1\n CPU: (10) arm64 Apple M1 Max\n Memory: 682.48 MB / 64.00 GB\n Shell: 5.9 - /bin/zsh\n Binaries:\n Node: 18.18.2 - ~/Library/Caches/fnm_multishells/44925_1740968664677/bin/node\n Yarn: 1.22.19 - ~/Library/Caches/fnm_multishells/44925_1740968664677/bin/yarn\n npm: 9.8.1 - ~/Library/Caches/fnm_multishells/44925_1740968664677/bin/npm\n pnpm: 8.15.6 - ~/Library/Caches/fnm_multishells/44925_1740968664677/bin/pnpm\n bun: 1.2.4 - /opt/homebrew/bin/bun\n Browsers:\n Chrome: 133.0.6943.142\n Safari: 18.3\n```\n\n### Describe the bug\n\nWhen `httpBatchStreamLink` has multiple long-running requests, aborting one (with an AbortController) causes \"both\" requests to keep running until the final one has been ended/aborted\n\nCould we have an `httpStreamLink` without batch? All I want is async generator procedures. They are awesome.\n\n### Link to reproduction\n\nStackblitz crashes\n\n### To reproduce\n\nJust call the same long-running procedure twice, abort one and see both still running on the backend.\n\nThe procedure could be something like\n\n```ts\nasync function* () {\n let count = 0\n while (true) {\n console.log('running', count)\n yield count++\n await new Promise(r => setTimeout(r, 1000))\n }\n}\n```\n\n### Additional information\n\nAs a side note: I also noticed that aborts don't get caught at all when running with bun and using the express adapter.\n\n### 👨👧👦 Contributing\n\n- [ ] 🙋♂️ Yes, I'd be down to file a PR fixing this bug!",[3206,3209],{"name":3207,"color":3208},"👻 invalid","e4e669",{"name":3176,"color":3177},6582,"closed","bug: httpBatchStreamLink doesn't a request abort if other requests are on the same batch","2025-03-20T12:03:10Z","https://github.com/trpc/trpc/issues/6582",0.7408842,{"description":3217,"labels":3218,"number":3228,"owner":3179,"repository":3179,"state":3211,"title":3229,"updated_at":3230,"url":3231,"score":3232},"### Describe the feature you'd like to request\r\n\r\nI am using `wsLink` inside of a `splitLink` and would like a way to only open a WS connection if it's needed since only a small portion of my site needs the live feed.\r\n\r\nIt looks like #2765 implemented this, but from what I can tell, it was never merged. If there's a reason behind this, please let me know as I was unable to find any additional information.\r\n\r\n### Describe the solution you'd like to see\r\n\r\nan option in `createWSClient` that, when toggled, will only open a WS connection when required and will close the connection after a certain idle time.\r\n\r\n### Describe alternate solutions\r\n\r\nI'm unaware of any workarounds for this except recreating your the createWSClient function, which is tricky because the current implementation uses imports from files that are not exported. This makes it so that I would have to fork trpc and edit the source and package my own version, or copy-paste a bunch of internal code, or reimplement everything from scratch.\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 implementing this feature!",[3219,3222,3225],{"name":3220,"color":3221},"⏭ major bump needed","242271",{"name":3223,"color":3224},"next-major/definite","5319E7",{"name":3226,"color":3227},"✅ accepted-PRs-welcome","0052cc",5028,"feat: createWSClient lazy mode","2025-03-20T15:42:03Z","https://github.com/trpc/trpc/issues/5028",0.7429293,{"description":3234,"labels":3235,"number":3236,"owner":3179,"repository":3179,"state":3211,"title":3237,"updated_at":3238,"url":3239,"score":3240},"### Provide environment information\r\n\r\n```\r\n System:\r\n OS: macOS 13.4.1\r\n CPU: (8) arm64 Apple M1\r\n Memory: 223.42 MB / 16.00 GB\r\n Shell: 5.9 - /bin/zsh\r\n Binaries:\r\n Node: 18.16.0 - ~/.nvm/versions/node/v18.16.0/bin/node\r\n Yarn: 1.22.19 - ~/.nvm/versions/node/v18.16.0/bin/yarn\r\n npm: 9.8.1 - ~/.nvm/versions/node/v18.16.0/bin/npm\r\n pnpm: 8.6.6 - ~/.nvm/versions/node/v18.16.0/bin/pnpm\r\n Browsers:\r\n Brave Browser: 115.1.56.14\r\n Safari: 16.5.2\r\n npmPackages:\r\n @tanstack/react-query: ^4.18.0 => 4.32.1 \r\n @trpc/client: ^10.36.0 => 10.36.0 \r\n @trpc/next: ^10.36.0 => 10.36.0 \r\n @trpc/react-query: ^10.36.0 => 10.36.0 \r\n @trpc/server: ^10.36.0 => 10.36.0 \r\n next: ^13.4.8 => 13.4.12 \r\n react: 18.2.0 => 18.2.0 \r\n typescript: 5.1.3 => 5.1.3 \r\n```\r\n\r\n### Describe the bug\r\n\r\nWhile using [https://github.com/trpc/trpc/tree/main/examples/next-prisma-todomvc](next-prisma-todomvc) reproduction everything seems to be working fine, however, when I do first request httpUtils gets this error:\r\n\r\n```\r\n \u003C\u003C query #1 user.all {\r\n input: undefined,\r\n result: TRPCClientError: Unexpected token \u003C in JSON at position 0\r\n at TRPCClientError.from (file:///Volumes/DEV/ulobo/node_modules/@trpc/client/dist/TRPCClientError-fef6cf44.mjs:26:16)\r\n at file:///Volumes/DEV/ulobo/node_modules/@trpc/client/dist/httpUtils-ad76b802.mjs:125:36\r\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {\r\n meta: { response: [Response] },\r\n shape: undefined,\r\n data: undefined,\r\n [cause]: SyntaxError: Unexpected token \u003C in JSON at position 0\r\n at JSON.parse (\u003Canonymous>)\r\n at parseJSONFromBytes (node:internal/deps/undici/undici:6571:19)\r\n at successSteps (node:internal/deps/undici/undici:6545:27)\r\n at node:internal/deps/undici/undici:1211:60\r\n at node:internal/process/task_queues:140:7\r\n at AsyncResource.runInAsyncScope (node:async_hooks:203:9)\r\n at AsyncResource.runMicrotask (node:internal/process/task_queues:137:8)\r\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\r\n },\r\n elapsedMs: 61\r\n}\r\nTRPCClientError: Unexpected token \u003C in JSON at position 0\r\n at TRPCClientError.from (file:///Volumes/DEV/ulobo/node_modules/@trpc/client/dist/TRPCClientError-fef6cf44.mjs:26:16)\r\n at file:///Volumes/DEV/ulobo/node_modules/@trpc/client/dist/httpUtils-ad76b802.mjs:125:36\r\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {\r\n meta: {\r\n response: Response {\r\n [Symbol(realm)]: null,\r\n [Symbol(state)]: [Object],\r\n [Symbol(headers)]: [HeadersList]\r\n }\r\n },\r\n shape: undefined,\r\n data: undefined,\r\n [cause]: SyntaxError: Unexpected token \u003C in JSON at position 0\r\n at JSON.parse (\u003Canonymous>)\r\n at parseJSONFromBytes (node:internal/deps/undici/undici:6571:19)\r\n at successSteps (node:internal/deps/undici/undici:6545:27)\r\n at node:internal/deps/undici/undici:1211:60\r\n at node:internal/process/task_queues:140:7\r\n at AsyncResource.runInAsyncScope (node:async_hooks:203:9)\r\n at AsyncResource.runMicrotask (node:internal/process/task_queues:137:8)\r\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\r\n}\r\n```\r\n\r\n\r\n\r\n### Link to reproduction\r\n\r\nhttps://github.com/porydzaj/trpc-404-httputils\r\n\r\n### To reproduce\r\n\r\nRun first fetch at index with utils/trpc\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!",[],4671,"bug: Unexpected token \u003C in JSON at position 0","2025-03-20T15:41:49Z","https://github.com/trpc/trpc/issues/4671",0.7546312,{"description":3242,"labels":3243,"number":3255,"owner":3179,"repository":3179,"state":3211,"title":3256,"updated_at":3257,"url":3258,"score":3259},"### Provide environment information\n\nWorks on \r\n```\r\n \"@trpc/client\": \"11.0.0-rc.660\",\r\n \"@trpc/react-query\": \"11.0.0-rc.660\",\r\n \"@trpc/server\": \"11.0.0-rc.660\",\r\n```\r\n\r\nFails on\r\n```\r\n \"@trpc/client\": \"11.0.0-rc.688\",\r\n \"@trpc/react-query\": \"11.0.0-rc.688\",\r\n \"@trpc/server\": \"11.0.0-rc.688\",\r\n```\n\n### Describe the bug\n\nAfter updating trpc packages to v11.0.0-rc.688 trpc.Provider throws an uncaught exception\r\n\r\n```\r\nCannot read properties of undefined (reading '__untypedClient')\r\n\r\nThe above error occurred in the \u003CTRPCProvider> component:\r\n\r\n at TRPCProvider (https://localhost:2013/coupons.dev.js:29544:17)\r\n at QueryProvider (https://localhost:2013/coupons.dev.js:10038:33)\r\n```\n\n### Link to reproduction\n\nhttps://discord.com/channels/867764511159091230/1326639424708022363/1326639424708022363\n\n### To reproduce\n\nI would not know where to start to get even something remotely close to our setup in StackBlitz or similar... but i will share some code snippets i think are relevant maybe it is something very obvious:\r\n\r\nWe have a file named trpc.ts that contains the following:\r\n\r\n```ts\r\nimport type { AppRouter } from '@our-api';\r\nimport { createTRPCReact } from '@trpc/react-query';\r\nimport type { inferRouterOutputs } from '@trpc/server';\r\n\r\nexport type RouterOutputs = inferRouterOutputs\u003CAppRouter>;\r\n\r\nexport const trpc = createTRPCReact\u003CAppRouter>();\r\n```\r\n\r\nthen we have a QueryProvider.tsx file that contains\r\n```tsx\r\nimport type { ReactNode } from 'react';\r\nimport React, { useState } from 'react';\r\n\r\nimport { createQueryClient, useTRPCClientLinks } from '@/utils';\r\nimport { QueryClientProvider } from '@tanstack/react-query';\r\n\r\nimport { trpc } from './trpc';\r\n\r\nconst queryClient = createQueryClient();\r\n\r\ntype CouponsQueryProviderProps = {\r\n children: ReactNode;\r\n};\r\n\r\nexport const CouponsQueryProvider = ({ children }: CouponsQueryProviderProps) => {\r\n const links = useTRPCClientLinks(process.env.COUPONS_API_URL ?? '');\r\n const [trpcClient] = useState(trpc.createClient({ links }));\r\n\r\n return (\r\n \u003Ctrpc.Provider client={trpcClient} queryClient={queryClient}>\r\n \u003CQueryClientProvider client={queryClient}>{children}\u003C/QueryClientProvider>\r\n \u003C/trpc.Provider>\r\n );\r\n};\r\n```\r\n\r\nthe @/utils function createQueryClient is defined as:\r\n\r\n```ts\r\nimport { MutationCache, QueryCache, QueryClient } from '@tanstack/react-query';\r\nimport { TRPCClientError } from '@trpc/client';\r\n\r\nimport { CredentialsHandler } from '../credentials';\r\n\r\nexport const createQueryClient = () => {\r\n const unauthorizedHandlerOptions = {\r\n onError: (error: unknown) => {\r\n if (error instanceof TRPCClientError && error.data?.code === 'UNAUTHORIZED') {\r\n const credentialsHandler = CredentialsHandler.getInstance();\r\n\r\n credentialsHandler.clearCredentials();\r\n\r\n window.location.pathname = '/login';\r\n }\r\n },\r\n };\r\n\r\n return new QueryClient({\r\n queryCache: new QueryCache(unauthorizedHandlerOptions),\r\n mutationCache: new MutationCache(unauthorizedHandlerOptions),\r\n defaultOptions: {\r\n queries: {\r\n refetchOnWindowFocus: false,\r\n staleTime: 30 * 1000,\r\n retry(failureCount, error) {\r\n if (error instanceof TRPCClientError) {\r\n const { data } = error;\r\n if (data?.httpStatus >= 400 && data?.httpStatus \u003C 500) {\r\n return false;\r\n }\r\n }\r\n\r\n return failureCount \u003C 3;\r\n },\r\n },\r\n },\r\n });\r\n};\r\n```\r\nand the useTRPCClientLinks file imported in the QueryProvider.tsx file is like this:\r\n\r\n```ts\r\nimport { useState } from 'react';\r\n\r\nimport { getFetch, httpLink, splitLink, unstable_httpSubscriptionLink } from '@trpc/client';\r\n\r\nimport { CredentialsHandler } from '../credentials';\r\n\r\nimport { usePosthog } from './usePosthog';\r\n\r\nexport const useTRPCClientLinks = (url: string) => {\r\n const posthog = usePosthog();\r\n\r\n const [links] = useState(() => {\r\n const http = httpLink({\r\n url,\r\n fetch: async (input, init) => {\r\n const fetch = getFetch();\r\n return fetch(input, { ...init, credentials: 'include' });\r\n },\r\n headers: () => {\r\n const originURL = window.location.href;\r\n const credentialsHandler = CredentialsHandler.getInstance();\r\n let parsedReleaseState: string = 'unknown';\r\n try {\r\n const parsed = JSON.parse(window?.localStorage.getItem('releaseState') || '{}');\r\n parsedReleaseState = parsed?.fetchedRelease;\r\n } catch {\r\n parsedReleaseState = 'unknown';\r\n }\r\n\r\n return {\r\n 'origin-url': originURL,\r\n ...(credentialsHandler.getStoredCredentials() ?? {}),\r\n 'posthog-session-recording-url': posthog.get_session_replay_url({ withTimestamp: true }),\r\n 'frontend-version': parsedReleaseState,\r\n };\r\n },\r\n });\r\n\r\n return [\r\n splitLink({\r\n condition: (op) => op.type === 'subscription',\r\n true: unstable_httpSubscriptionLink({\r\n url,\r\n }),\r\n false: http,\r\n }),\r\n ];\r\n });\r\n\r\n return links;\r\n};\r\n\r\n```\r\n\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!",[3244,3247,3248,3251,3254],{"name":3245,"color":3246},"🙋♂️ help wanted","008672",{"name":3207,"color":3208},{"name":3249,"color":3250},"🔎 needs more investigation/info","d4c5f9",{"name":3252,"color":3253},"⏮ needs reproduction","000055",{"name":3176,"color":3177},6374,"Cannot read properties of undefined (reading '__untypedClient') on trpc.Provider","2025-01-19T00:08:09Z","https://github.com/trpc/trpc/issues/6374",0.75504124,{"description":3261,"labels":3262,"number":3267,"owner":3179,"repository":3179,"state":3211,"title":3268,"updated_at":3269,"url":3270,"score":3271},"### Describe the bug\r\n\r\nIn working with streams we've inlined some vendor code which depends on `ReadableStream`, the result of `Readable.toWeb`. \r\n\r\n* Readable is a long-standing nodejs API, but ReadableStream is new, since 17.x\r\n* Given we want to support node 16 (and there are good reasons even past LTS to do this) this is a problem.\r\n* Also the API is technically considered experimental, so we should be prepared with po[l|n]yfills for that reason too.\r\n\r\nIt looks to be that nodejs have put this API into userland here: https://github.com/nodejs/readable-stream\r\n\r\nWe could set this up as a optionalPeerDependency and document that it needs installing for the non-json data APIs, or just install it as a direct dependency.\r\n\r\n### To reproduce\r\n\r\n\u003Cimg width=\"826\" alt=\"image\" src=\"https://user-images.githubusercontent.com/8896153/236567348-57931ab3-0cfa-47aa-9fb9-dfe2b729129e.png\">\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!\n\n\u003Csub>[TRP-32](https://linear.app/trpc/issue/TRP-32/feat-make-experimental-formdata-api-compatible-with-node-17x)\u003C/sub>",[3263,3266],{"name":3264,"color":3265},"@trpc/server","9BE78E",{"name":3226,"color":3227},4322,"feat: make Experimental FormData API compatible with node \u003C17.x","2025-03-20T15:41:40Z","https://github.com/trpc/trpc/issues/4322",0.7582724,{"description":3273,"labels":3274,"number":3276,"owner":3179,"repository":3179,"state":3211,"title":3277,"updated_at":3278,"url":3279,"score":3280},"Hi @KATT, thank you and all the contributors for your hard work with this library. I am running into the following issue.\r\n\r\n**Issue**\r\n\r\nAfter cloning the examples-next-prisma-starter repo, and setting `pageExtensions` in next.config.js, and running `npm run dx` I receive the following error:\r\n\r\n\r\n\r\n\r\n**trpc version(s):** \r\n\r\n- \"@trpc/client\": \"^9.17.0\",\r\n- \"@trpc/next\": \"^9.17.0\",\r\n- \"@trpc/react\": \"^9.17.0\",\r\n- \"@trpc/server\": \"^9.17.0\"\r\n\r\n**How to replicate**\r\n1. clone https://github.com/trpc/examples-next-prisma-starter\r\n2. update the next.config.js file to the following:\r\n```\r\n/**\r\n * @link https://nextjs.org/docs/api-reference/next.config.js/introduction\r\n * @type {import('next').NextConfig}\r\n */\r\nconst nextConfig = {\r\n pageExtensions: ['page.tsx'],\r\n reactStrictMode: true,\r\n};\r\n\r\nmodule.exports = nextConfig;\r\n```\r\n3. Change the name of `pages/index.tsx` to `pages/index.page.tsx`\r\n4. Start the application by running `npm run dx`\r\n5. Navigate to the application in your browser\r\n\r\nNote: I am adding the `.page.` extension to my pages in order to have my .test files adjacent to my page files. Next attempts to build the test file unless I follow the fix posted here: https://www.reddit.com/r/nextjs/comments/lm0soy/any_way_to_omit_test_files_from_the_build_process/",[3275],{"name":3249,"color":3250},1437,"Receiving client error when using `pageExtensions` in next.config.js","2022-10-04T18:07:28Z","https://github.com/trpc/trpc/issues/1437",0.76012,{"description":3282,"labels":3283,"number":3285,"owner":3179,"repository":3179,"state":3211,"title":3286,"updated_at":3287,"url":3288,"score":3289},"### Provide environment information\n\n```\r\n System:\r\n OS: Windows 11 10.0.22631\r\n CPU: (12) x64 AMD Ryzen 5 5600X 6-Core Processor\r\n Memory: 6.61 GB / 31.93 GB\r\n Binaries:\r\n Node: 20.10.0 - D:\\Program Files\\nodejs\\node.EXE\r\n Yarn: 1.22.19 - ~\\AppData\\Roaming\\npm\\yarn.CMD\r\n npm: 10.2.3 - D:\\Program Files\\nodejs\\npm.CMD\r\n pnpm: 8.14.0 - ~\\AppData\\Local\\pnpm\\pnpm.EXE\r\n Browsers:\r\n Edge: Chromium (120.0.2210.77)\r\n Internet Explorer: 11.0.22621.1\r\n npmPackages:\r\n @tanstack/react-query: ^5.8.7 => 5.8.7\r\n @trpc/client: ^10.45.0 => 10.45.0\r\n @trpc/next: ^10.45.0 => 10.45.0\r\n @trpc/react-query: ^10.45.0 => 10.45.0\r\n @trpc/server: ^10.45.0 => 10.45.0\r\n next: ^14.0.4 => 14.0.4\r\n react: 18.2.0 => 18.2.0\r\n typescript: ^5.3.3 => 5.3.3\r\n```\r\n\n\n### Describe the bug\n\nI can't use the options on my queries like it is described in the documentation:\r\n\r\n```\r\nTS2769: No overload matches this call.\r\nOverload 1 of 2,\r\n(input: { coordinates: { lat: number; lon: number; }; timezone: string; }, opts: DefinedUseTRPCQueryOptions\u003C\"weather.getWeather\", { coordinates: { lat: number; lon: number; }; timezone: string; }, { time: { time: string; timezone: string; }; ... 16 more ...; maxUVIndex: number | undefined; }, { ...; }, TRPCClientErrorLike\u003C...>, { ...; }>): DefinedUseTRPCQueryResult\u003C...>\r\n, gave the following error.\r\nArgument of type\r\n{ refetchOnWindowFocus: false; staleTime: number; }\r\nis not assignable to parameter of type\r\nDefinedUseTRPCQueryOptions\u003C\"weather.getWeather\", { coordinates: { lat: number; lon: number; }; timezone: string; }, { time: { time: string; timezone: string; }; temperature: number | undefined; highestTemperature: number; ... 14 more ...; maxUVIndex: number | undefined; }, { ...; }, TRPCClientErrorLike\u003C...>, { ...; }>\r\nType\r\n{ refetchOnWindowFocus: false; staleTime: number; }\r\nis missing the following properties from type\r\nDefinedUseTRPCQueryOptions\u003C\"weather.getWeather\", { coordinates: { lat: number; lon: number; }; timezone: string; }, { time: { time: string; timezone: string; }; temperature: number | undefined; highestTemperature: number; ... 14 more ...; maxUVIndex: number | undefined; }, { ...; }, TRPCClientErrorLike\u003C...>, { ...; }>\r\n: initialData, queryKey\r\nOverload 2 of 2,\r\n(input: { coordinates: { lat: number; lon: number; }; timezone: string; }, opts?: UseTRPCQueryOptions\u003C\"weather.getWeather\", { coordinates: { lat: number; lon: number; }; timezone: string; }, { time: { time: string; timezone: string; }; ... 16 more ...; maxUVIndex: number | undefined; }, { ...; }, TRPCClientErrorLike\u003C...>, { ...; }> | undefined): UseTRPCQueryResult\u003C...>\r\n, gave the following error.\r\nArgument of type\r\n{ refetchOnWindowFocus: false; staleTime: number; }\r\nis not assignable to parameter of type\r\nUseTRPCQueryOptions\u003C\"weather.getWeather\", { coordinates: { lat: number; lon: number; }; timezone: string; }, { time: { time: string; timezone: string; }; temperature: number | undefined; highestTemperature: number; ... 14 more ...; maxUVIndex: number | undefined; }, { ...; }, TRPCClientErrorLike\u003C...>, { ...; }>\r\nProperty queryKey is missing in type\r\n{ refetchOnWindowFocus: false; staleTime: number; }\r\nbut required in type\r\nUseTRPCQueryOptions\u003C\"weather.getWeather\", { coordinates: { lat: number; lon: number; }; timezone: string; }, { time: { time: string; timezone: string; }; temperature: number | undefined; highestTemperature: number; ... 14 more ...; maxUVIndex: number | undefined; }, { ...; }, TRPCClientErrorLike\u003C...>, { ...; }>\r\nqueryClient-13f81fcb.d.ts(306, 5): queryKey is declared here.\r\n```\r\n\r\n\r\n\r\n\r\n\n\n### Link to reproduction\n\nhttps://codesandbox.io/p/sandbox/github/The-Creative-Programming-Group/Weather-App/tree/move-to-turborepo\n\n### To reproduce\n\nGo inside your editor to the apps/web/src/pages/home/index.tsx file and see the error\r\n\r\nNOTE: The app is not working but the bug is the type error\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!",[3284],{"name":3176,"color":3177},5261,"bug: ","2025-03-20T15:42:10Z","https://github.com/trpc/trpc/issues/5261",0.76052785,["Reactive",3291],{},["Set"],["ShallowReactive",3294],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$f3m6eUjZfNgA98euvnU4sopFuvATBbTWHd6wpJAx56js":-1},"/trpc/trpc/6540"]