Captain
Captain2y ago

what is the best way to update trpc and its dependencies?

Hi all, as the title says, how can i best update trpc and its dependencies? TRPC stands at 10.25.1, but is this @trpc/server or @trpc/client or next, or tanstack?
21 Replies
Captain
Captain2y ago
also what is the best combination of next.js version and trpc version? can i still use trpc with next@13.4.1?
Nick
Nick2y ago
It’s rare that either project makes a breaking change Just keep tRPC packages all in line, and if Next does a major update then upgrade with care, and come check if GitHub has any open issues
Captain
Captain2y ago
but how exactly do i update trpc? its not a stand alone package. it works with trpc/client, next and tanstack
Nick
Nick2y ago
What do you mean? You just use your package manager to update it?
Captain
Captain2y ago
maybe im not understanding something. which one the following do i update? ` "@trpc/client": "^10.18.0", "@trpc/next": "^10.18.0", "@trpc/react-query": "^10.18.0", "@trpc/server": "^10.18.0",`
Nick
Nick2y ago
All of them, keep them in-line or you’ll have issues
Captain
Captain2y ago
perfect. thnx man care for a chat about trpc and its future with respect to next 13?
Alex / KATT 🐱
i usually do
npx npm-check-updates --filter /trpc/ -u
npx npm-check-updates --filter /trpc/ -u
Captain
Captain2y ago
i'll remember that for the future. thnx Katt @alex / KATT can u share your thoughts with me?
Alex / KATT 🐱
FAQ / Troubleshooting | tRPC
Collection of frequently asked questions with ideas on how to troubleshoot & resolve them.
Alex / KATT 🐱
GitHub
where should I put trpc.withTRPC in nextjs 13? · trpc trpc · Discus...
greetings. I'm new to trpc,and learning with nextjs 13 beta app directory. where should I put trpc.withTRPC? I created CreateTRPCNext. export const trpc = createTRPCNext<AppRouter>({ conf...
Captain
Captain2y ago
but it has been a while since there has been new from you. specially since the appDir is now prod ready and recommended by the next.js team i have seen the 2 links above before btw
Nick
Nick2y ago
The only thing missing is someone contributing an example project, right?
Captain
Captain2y ago
true but i really dont have the time. im a full time employee. thats why i chose to support TRPC monetarily
Nick
Nick2y ago
It’s fair enough, some of the guys are investigating this topic, but the structure is still experimental albeit “stable” so we’re not going to rush it
Captain
Captain2y ago
i mean i wouldnt mind being a contributor but i cant commit any specific amount of time i get that 100. im just very excited about shared layouts in next 13. i dislike the per page layout of previous next versions
Nick
Nick2y ago
No commitment required, if you have the energy and time at some point any contributions are welcome 🙏 We’ll have some proper advice quite soon I’m sure
Captain
Captain2y ago
im getting the following error even though im not using the appDir.
info Generating static pages (0/3)TypeError: Cannot read properties of null (reading 'useMemo')
info Generating static pages (0/3)TypeError: Cannot read properties of null (reading 'useMemo')
Alex / KATT 🐱
I think that's a bug in nextjs tbh Looks familiar to when I tried to bump nextjs Downgrade nextjs a minor version or two and see if works
Captain
Captain2y ago
i did. turns out i was updating packages incorrectly with nx monorepo @Nick Lucas i really want to start using the next13 app dir and shared layouts. I say let me take a crack at building a example Are u ok with giving me guidance?
Alex / KATT 🐱
GitHub
GitHub - trpc/examples-next-app-dir
Contribute to trpc/examples-next-app-dir development by creating an account on GitHub.