anton 4ynpyH
anton 4ynpyH9mo ago

router is crashing when in separate file

When i use router merging and have e.g users router in separate file, i import router from trpc.ts and it is indefined when i use its methods, if users router is in trpc.ts everything is ok
Solution:
managed this stuff, took example file structure from Docs)
Jump to solution
6 Replies
BillyBob
BillyBob9mo ago
More info or code repoduction
Nick
Nick9mo ago
Sounds like you have a cyclic dependency
anton 4ynpyH
anton 4ynpyH9mo ago
@Nick Lucas @BillyBob
No description
No description
Nick
Nick9mo ago
So a cyclic dependency then
anton 4ynpyH
anton 4ynpyH9mo ago
so how to handle it, tell pls
Solution
anton 4ynpyH
anton 4ynpyH9mo ago
managed this stuff, took example file structure from Docs)