TRPC works but getting unpredictable Typescript warnings for a barebones trpc monorepo project
Hi,
TRPC is working as expected but there are many warnings that feels very "off" for simple procedures.
For example (included in the screenshots), procedures that just returns a static result have warnings. Also, setting up transformer with superjson has warnings.
Easiest way to replicate this is to clone (no changes needed) the create-t3-turbo (https://github.com/t3-oss/create-t3-turbo - which uses @trpc/next), but it also happens the exact same on my project (using @trpc v10).
Environment:
- pnpm
- monorepo
- node 18
GitHub
GitHub - t3-oss/create-t3-turbo: Clean and simple starter repo usin...
Clean and simple starter repo using the T3 Stack along with Expo React Native - GitHub - t3-oss/create-t3-turbo: Clean and simple starter repo using the T3 Stack along with Expo React Native
1 Reply
So I've done two changes, and not sure which one did it, but I got it solved for me:
- Switched from
pnpm
to yarn
-managed monorepo
- In my tsconfig.json, I had incremental
option to true, after I removed tsBuildInfoFile
(points to node_modules/.cache/tsbuildinfo.json
)
I'll leave this open as a reference for others