t
tRPC
t
tRPC
AppRouter procedure inputs change from server to client workspaces in pnpm monorepo
Original message was deleted
tRPC
Join
Move Fast & Break Nothing. End-to-end typesafe APIs made easy.
5,111
Members
View on Discord
N
Nick
β’
3/14/23, 5:56 PM
This could be related to how you
're referencing the API project as an import or in tsconfig
N
Nick
β’
3/14/23, 6:19 PM
You might need to reflect this in your tsconfig too
N
Nick
β’
3/14/23, 6:20 PM
using exports is an unusual solution inside a monorepo though
, it might work but I
'm not sure what the side
-effects will be
N
Nick
β’
3/14/23, 6:25 PM
By side
-effects I mean your types going missing at the package boundary
N
Nick
β’
3/14/23, 6:26 PM
Add the paths to your tsconfig
N
Nick
β’
3/14/23, 6:26 PM
point at the source code and see if the types resolve right
N
Nick
β’
3/14/23, 6:46 PM
I
'd be interested to see more of your repo setup
, I
've seen a lot of people with similar issues and it always seems to boil down to not using workspaces
, linking packages together wrong
, etc
N
Nick
β’
3/14/23, 7:12 PM
Got it
, yes that
βs another example I
βve seen
. Hard to debug from afar
! Glad you sorted it
B
Ben Stickley
so you would recommend not using workspaces with tRPC?
N
Nick
β’
3/14/23, 7:13 PM
The opposite
!