\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!",[3108,3111],{"name":3109,"color":3110},"👻 invalid","e4e669",{"name":3056,"color":3057},6441,"bug: TRPC with nextjs 15(App Router) production build failed!","2025-02-05T17:24:47Z","https://github.com/trpc/trpc/issues/6441",0.6804336,{"description":3118,"labels":3119,"number":3123,"owner":3029,"repository":3029,"state":3030,"title":3124,"updated_at":3125,"url":3126,"score":3127},"`@trpc/next`: 7.2.1\r\n\r\nWrapping `_app` in `withTRPC` removes `pageProps`\r\n\r\nExample: `pageProps` is undefined:\r\n```ts\r\nimport {withTRPC} from \"@trpc/next\"\r\nimport {Provider} from \"next-auth/client\"\r\nimport {AppProps} from \"next/app\"\r\nimport \"../style/app.css\"\r\n\r\nfunction App({Component, pageProps}: AppProps) {\r\n console.log({pageProps}) // {pageProps: undefined}\r\n return (\r\n \u003CProvider session={pageProps.session}>\r\n \u003CComponent {...pageProps} />\r\n \u003C/Provider>\r\n )\r\n}\r\n\r\nexport default withTRPC(\r\n (_ctx) => ({\r\n url: \"http://localhost:3000/api/trpc\",\r\n queryClientConfig: {\r\n defaultOptions: {\r\n queries: {\r\n staleTime: 600\r\n }\r\n }\r\n }\r\n }),\r\n {ssr: true}\r\n)(App)\r\n```\r\n\r\nExample: `pageProps` is not undefined:\r\n```ts\r\nimport {Provider} from \"next-auth/client\"\r\nimport {AppProps} from \"next/app\"\r\nimport \"../style/app.css\"\r\n\r\nexport default function App({Component, pageProps}: AppProps) {\r\n return (\r\n \u003CProvider session={pageProps.session}>\r\n \u003CComponent {...pageProps} />\r\n \u003C/Provider>\r\n )\r\n}\r\n```",[3120],{"name":3121,"color":3122},"🔎 needs more investigation/info","d4c5f9",574,"@trpc/next withTRPC \"eats\" pageProps ","2022-10-05T00:09:46Z","https://github.com/trpc/trpc/issues/574",0.68224144,{"description":3129,"labels":3130,"number":3134,"owner":3029,"repository":3029,"state":3030,"title":3135,"updated_at":3136,"url":3137,"score":3138},"> Also, as you're pointing out, RSC will hopefully fix this for us. I don't want to put too much more effort into `withTRPC` in it's current form as it will _hopefully_ be deprecated pretty soon (that said, for v10, we should probably make sure we have an API design that makes it tree shakable when/if that happens 😅 )\r\n>\r\n> _Originally posted by @KATT in https://github.com/trpc/trpc/issues/2625#issuecomment-1240397342_\r\n\r\n\r\nMaybe we should move the `withTRPC` to it's own `import` so it can be tree-shaken when/if [RSC](https://nextjs.org/docs/advanced-features/react-18/server-components) or the [Next.js Layouts](https://nextjs.org/blog/layouts-rfc) arrives so it can be tree-shaken as it will will likely have to be non-compatible to that API or make a bunch of stuff redundant.\r\n\r\n\r\n## Suggested change\r\n\r\n\r\n#### Before\r\n\r\n```tsx\r\n\r\n// _app.tsx\r\nimport { AppType } from 'next/dist/shared/lib/utils';\r\nimport { ReactElement, ReactNode } from 'react';\r\nimport { trpc } from '~/utils/trpc';\r\n\r\nconst MyApp: AppType = (({ Component, pageProps }) => {\r\n return \u003CComponent {...pageProps} />;\r\n})\r\n\r\nexport default trpc.withTRPC(MyApp);\r\n```\r\n\r\n#### After\r\n\r\n> Not thrilled about exactly this API-design, but gets the point across that `withTRPC()` can be tree shaken, feel free to do other suggestions\r\n\r\n```ts\r\n// _app.tsx\r\nimport { AppType } from 'next/dist/shared/lib/utils';\r\nimport { trpc } from '~/utils/trpc';\r\nimport { createTRPCNextWithTRPC } from '@trpc/next';\r\n\r\nconst MyApp: AppType = (({ Component, pageProps }) => {\r\n return \u003CComponent {...pageProps} />;\r\n})\r\n\r\nexport default createWithTRPC(trpc)(MyApp);\r\n```\r\n",[3131],{"name":3132,"color":3133},"RFC","78B062",2650,"Break out `withTRPC` from `createTRPCNext`?","2022-11-04T00:06:57Z","https://github.com/trpc/trpc/issues/2650",0.6849462,["Reactive",3140],{},["Set"],["ShallowReactive",3143],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fEECcGQzI5x2v__bJ4F5QacXnIFIJFnxPocIPS_rCRuo":-1},"/trpc/trpc/1507"]