-
Notifications
You must be signed in to change notification settings - Fork 300
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: (RPC) add info about matching hono versions client-server #552
base: main
Are you sure you want to change the base?
Conversation
Add information about using Hono RPC in projects where the client and server are in a single project.
Hi @catalinpit ! Thank you for the PR. This will be helpful. I think we must add the description, not be in the Because the problem is not only when the code is being compiled; other problems will happen without compiling. For example, suppose you have monorepo, which includes one server application and one frontend. In that case, if the versions are different and, you use the exported type from the server app in the frontend, the editor throws the error like this: Repro: https://github.com/yusukebe/hono-version-mismatch This problem occurs not only due to a version mismatch but also when the paths to the |
Hey @yusukebe, thanks for the reply and suggestion! I actually ran into that problem as well - I'll add a new section! |
Done. Change made. 🙌 |
@@ -523,8 +533,6 @@ const res = await client.posts.$post({ | |||
|
|||
If your project is a monorepo, this solution does fit well. Using a tool like [`turborepo`](https://turbo.build/repo/docs), you can easily separate the server project and the client project and get better integration managing dependencies between them. Here is [a working example](https://github.com/m-shaka/hono-rpc-perf-tips-example). | |||
|
|||
If your client and server are in a single project, [project references](https://www.typescriptlang.org/docs/handbook/project-references.html) of `tsc` is a good option. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we remove this line? I think it's OK to leave it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added it above in its section #### TypeScript project references
. Should I leave it here as well?
Sorry for the late response. I've added the comment! |
No worries. Thanks for the replies! |
Add information about using Hono RPC in projects where the client and server are in a single project. I spent way too much time wrestling with this before finding a comment online about the Hono version.