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
6 Replies
More info or code repoduction
Sounds like you have a cyclic dependency
@Nick Lucas @BillyBob
![No description](https://cdn.answeroverflow.com/1203034724931600394/Screenshot_2024-02-02_at_19.49.37.png)
![No description](https://cdn.answeroverflow.com/1203034725384593438/Screenshot_2024-02-02_at_19.49.54.png)
So a cyclic dependency then
so how to handle it, tell pls
Solution
managed this stuff, took example file structure from Docs)