pvman
pvman
TtRPC
Created by kosilica on 8/22/2023 in #❓-help
useContext won't infer type from tRPC client
Do you mind sharing what old code did you delete? I'm using trpc 10.45.2 and have this error when trying to use useUtils. I also get The property '${any}' in your router collides with a built-in method, rename this router or procedure on your backend. and my trpc queries/mutations work just fine.
5 replies
TtRPC
Created by pvman on 4/11/2024 in #❓-help
> Error: Invariant: headers() expects to have requestAsyncStorage, none available
Thanks a lot for the clarification and for helping @BeBoRE , really appreciate!
8 replies
TtRPC
Created by pvman on 4/11/2024 in #❓-help
> Error: Invariant: headers() expects to have requestAsyncStorage, none available
But would like to only have to do : const post = await api.posts.getPostById(slug);
8 replies
TtRPC
Created by pvman on 4/11/2024 in #❓-help
> Error: Invariant: headers() expects to have requestAsyncStorage, none available
const api = await createServerApi();
const post = await api.posts.getPostById(slug);

const api = await createServerApi();
const post = await api.posts.getPostById(slug);

8 replies
TtRPC
Created by pvman on 4/11/2024 in #❓-help
> Error: Invariant: headers() expects to have requestAsyncStorage, none available
Oh ok, but why is it working for static route? So no way to have a single function to call in the server ? I have to do :
8 replies