Separating routers into their own modules and merging them causes "any" type in client

Ssugar_water5/2/2023
Hi all,

I've separated my router into multiple files, but when merging them I get any types for all procedures in the client. This happens with both mergeRouters and composing a parent router with multiple child routers.

It seems like trpc is loosing type information... I've verified that both my client and server trpc have the same version, 10.23.0, and that my typescript configuration is correct according to the docs.

My environment is:

node: v19.2.0
npm 8.19.3

Anyone know what's up with this? Thanks!
Nnlucas5/2/2023
Have you reloaded your typescript server?
Nnlucas5/2/2023
Could you share some of the relevant code?
Kkhill-fbmc5/10/2023
Hello, I hope its ok to revive this, with a possibly similiar question...
Kkhill-fbmc5/10/2023
I had / have a nextjs app with a very large router, and I thought it would be a good idea to break it apart into a monorepo because I wanted to be able to create more than one app, with the same api
Kkhill-fbmc5/10/2023
and then I broke apart my router into their respective service routers (example, I have a large Asana router, and Dropbox, and Salesforce....) I made each "service" a module in the monorepo, because they also have components and other "service" specific things.... now here is my issue....
Kkhill-fbmc5/10/2023
how can I build up the big router, from the different modules? I keep running into issues where I can't export "router" from api to each service and add to the router, because then I have to import it back and that's a cycle... So I thought maybe I can import the clients from the services, build middlewares in api and export procedures.... but then I still need to use router from api to build up the whole thing.....
Kkhill-fbmc5/10/2023
Is what I am trying to do even possible?
Kkhill-fbmc5/10/2023
does the whole, complete router need to be exported in one shot? Can I even have external modules bring functionality into the tRPC router? I feel like I must be missing something....
Ssugar_water5/26/2023
Hello, replying back late. Issue was I was using the "Volar" extension in VSCode (since this is a Vue project). I fixed the issue by disabling the extension