-
Notifications
You must be signed in to change notification settings - Fork 102
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
Error while trying to use TRPC serverside #14
Comments
Hey Krystian - thanks for flagging. Are you using planetscale? I encountered this issue as well (only with planetscale) and haven't been able to find a solution. For the time being, I've been using the underlying query that runs on the server (so in this case getComputers()) in the server component and then sending that data down to a client component that uses trpc on the client side. For the server side TRPC implementation, I'm leveraging an experimental feature from the TRPC team called server invocation. Hopefully as the Nextjs team solves the issues around caching, this will get resolved. |
yes, I'm using MySQL with Planetscale. I've also tried implementing the experimental features to get TRPC to work on the server with app dir before I learned about your project, but with little success. Yea, noticed your PR changing from using api.computers.getComputers to getComputers right after I posted the issue hah, will use the same approach for now and hopefully we have the issue sorted in the near future! Great work on the Kirimase, love it already |
Ha yes indeed - stumped me for a while and then I just gave up. Hopefully resolved soon! and thank you, happy to hear 😊 |
think for now the best would be to use plain db calls instead of trpc for RSCs until it's solved |
I just encountered the same issue -, solution for me was to only invoke db calls using the planetscale driver on the edge. Solution export const runtime = "edge" Do we know why this could be? 🤔 Also, maybe not the forum to discuss this, but anyway. Ill leave it here. |
I'm trying to use serverside TRPC client, I think it should be used like so:
but it's giving me the error of:
I can't seem to find any solution for that, Am I using it wrong?
The text was updated successfully, but these errors were encountered: