allenwhun
allenwhun5mo ago

procedures on routers are typed any

I'm using the better-t-stack. It also uses turborepo for trpc.
No description
No description
Solution:
Hi @Khojo & @ToolReaz I've made an issue to the official repository. Feel free to follow along and try the suggestions other said. https://github.com/AmanVarshney01/create-better-t-stack/issues/177...
GitHub
TRPC import cycle fails on client · Issue #177 · AmanVarshney01/c...
Stack used: Hono Drizzle React Native tRPC Problem faced: I'm trying to import the router that I created in a separate file and I when I try to merge the routers to the app router. The merged r...
Jump to solution
10 Replies
allenwhun
allenwhunOP5mo ago
the test router is typed correcty. It's just the spending router
Khojo
Khojo5mo ago
hey did you fix this issue @allenwhun i am facing the exact same and i also used the better-t-stack
allenwhun
allenwhunOP5mo ago
unfortunately, no. Let me know if you encounter the fix!
Khojo
Khojo5mo ago
Alright
ToolReaz
ToolReaz5mo ago
Hello, having the same issue since days. Using a monorepo with one folder for api and one for web app. I have tweaked tsconfig in all possible ways and locked TRPC's version to 11.1.0 in both apps but can't figure it out :/ I separated routers in subfiles, maybe it's the merge that is causing the issue ? Or a cycling import of trpc/publicProcedure ? 🤔 Would be nice if you had any v11 updated example repo to compare !
Solution
allenwhun
allenwhun4mo ago
Hi @Khojo & @ToolReaz I've made an issue to the official repository. Feel free to follow along and try the suggestions other said. https://github.com/AmanVarshney01/create-better-t-stack/issues/177
GitHub
TRPC import cycle fails on client · Issue #177 · AmanVarshney01/c...
Stack used: Hono Drizzle React Native tRPC Problem faced: I'm trying to import the router that I created in a separate file and I when I try to merge the routers to the app router. The merged r...
Khojo
Khojo4mo ago
@allenwhun thanks @allenwhun @ToolReaz mine has been resolved. All I had to do was change imports in the procedures to relative imports. Details in the issue
ToolReaz
ToolReaz4mo ago
Thanks, it works for me as well ! Just gonna remove alias in my ts configs i guess
allenwhun
allenwhunOP4mo ago
It also fixed mine
Jjmunky
Jjmunky2w ago
My routers were showing up as any types starting at the appRouter type being imported into the frontend and updating all trpc-related backend files to use relative imports rather than mapped ones fixed it for me too

Did you find this page helpful?