Replies: 9 comments 16 replies
-
I got it working a month or two ago, but now trying again with a new project and having the same problem, with:
My error was slightly different: Types of property '_def' are incompatible. I tried to simplify the implementation as much as possible, but couldn't figure it out. Eventually I tried the version that worked for me last time - I learned nothing, but it's working 🤷 |
Beta Was this translation helpful? Give feedback.
-
for anyone encountering an issue with frontend typescript complaining about type incompatibility, I had the same problem in yet another vue project, I tried everything I could think of, but then I saw this thread that mentioned // tsconfig.json
"strictNullChecks": true, I went into my main backend tsconfig and added that and the problem was gone! |
Beta Was this translation helpful? Give feedback.
-
This happens because of a version mismatch... I had @trpc dependencies specified like this in my frontend and backend separately: frontend/package.json: backend/package.json: And I got the exact same error mentioned above. The problem was, that some of the deps was on 10.15.1 v, BUT the BE package upgraded to "10.29.1". After I set 10.29.1 for each @trpc package, the error just gone. |
Beta Was this translation helpful? Give feedback.
-
I'm using turbo for monorepo, and the |
Beta Was this translation helpful? Give feedback.
-
This is almost always caused by a version mismatch between the client and server. It happened to me as well |
Beta Was this translation helpful? Give feedback.
-
Having the same trpc version in client & server solved this issue for me |
Beta Was this translation helpful? Give feedback.
This comment was marked as disruptive content.
This comment was marked as disruptive content.
-
calm down @akshatsabavat |
Beta Was this translation helpful? Give feedback.
-
We're a community and passion funded project and I prefer spending my (largely unpaid) evenings and weekends on new features and smashing bug over unpaid support, but I do feel bad that we aren't able to guide people more. Also, sponsors are amazing and they have helped me pay out over ~$50k to other contributors to date. I've netted ~$20-30k to date personally (~10-15k post tax) over the last three years on a project I've worked almost daily on, this makes absolutely zero financial sense based on what I could've made in consulting or similar instead, but I love working on trpc. Not sure what triggered me to do this monologue here and now, just wanted y'all to know we're doing our best. (@akshatsabavat, you're banned indefinitely) |
Beta Was this translation helpful? Give feedback.
-
Environments:
Server side, (express app)
Client side (solidjs with vanilla client)
My code and the error:
I cannot even start the work on the client side because the typescript already complaining about types :(
My code on client:
And the server side trpc code (i'm trying to simplify but nothing works)
And the errors on the client side:
I don't get it, i followed the tutorials and everything.
Pls help. Thank you
Beta Was this translation helpful? Give feedback.
All reactions