Cannot find module '@trpc/react-query/server' or its corresponding type declarations
This should work, right?
10 Replies
Where did you get that from? Should be @trpc/server
@Nick Lucas https://github.com/trpc/trpc/blob/04fa9d04420e677f3a8e46d3868169321eb5dcc8/packages/react-query/src/server/index.ts#L1 there 🙂
GitHub
trpc/index.ts at 04fa9d04420e677f3a8e46d3868169321eb5dcc8 · trpc/trpc
🧙♀️ Move Fast and Break Nothing. End-to-end typesafe APIs made easy. - trpc/index.ts at 04fa9d04420e677f3a8e46d3868169321eb5dcc8 · trpc/trpc
Ah maybe I'm getting mixed up then 😄
What's in your package.json?
actually, it's described here: https://trpc.io/docs/nextjs/ssg
Static Site Generation | tRPC
Reference project//github.com/trpc/examples-next-prisma-todomvc
You might need to update your tRPC version
Obviously package.json isn't necessarily the version you have pinned, but here's 10.18:
https://github.com/trpc/trpc/blob/8ec386ff118020356d39c8796b7bb68666abfe4c/packages/react-query/package.json
GitHub
trpc/package.json at 8ec386ff118020356d39c8796b7bb68666abfe4c · trp...
🧙♀️ Move Fast and Break Nothing. End-to-end typesafe APIs made easy. - trpc/package.json at 8ec386ff118020356d39c8796b7bb68666abfe4c · trpc/trpc
GitHub
trpc/package.json at 04fa9d04420e677f3a8e46d3868169321eb5dcc8 · trp...
🧙♀️ Move Fast and Break Nothing. End-to-end typesafe APIs made easy. - trpc/package.json at 04fa9d04420e677f3a8e46d3868169321eb5dcc8 · trpc/trpc
server was added recently 🙂
Updated the packages and now it works. Thanks!