Typescript type error with latest version
I'm initialising a project with trpc v11 and I'm trying to strictly follow the documentation for react-query.
I face a problem: everything works fine at runtime but in vscode I have 2 typescript errors:
1/ My hello procedure get this type error on
useQuery
: Property 'useQuery' does not exist on type 'never'.ts(2339)
on this line const q = trpc.hello.useQuery("thing");
in my component.
2/ In the AppRouter
in the frontend on this line:
Truncated error (full: https://pastebin.com/ZDD5nsy3):
Context:
I'm using react + vite + react query + bun.
package.json of frontend & backend are matching to 11.0.0-rc.340
1 Reply
For added context my router:
The issue is fixed. I'm not entirely sure why, after removing node_modules dir and reinstalling everything and restarting vscode types were ok