tRPCttRPC
Powered by
jacobJ
tRPC•3y ago•
4 replies
jacob

The inferred type of 'trpc' cannot be named without a reference ...

Hey everyone,

I just changed around the structure of my monorepo where I now have my nextjs application inside of
apps/nextjs
apps/nextjs
and my trpc server code in
packages/api
packages/api
.

Doing this however gives me this error which definitely seems related to types not being shared properly between the two packages. I am using yarn (1.22.19) workspaces.

I saw some other posts on here that seemed related but no matter what I did I couldn't get the error to disappear .. what is strange as well is that it is saying it cannot be named without a reference to the react query trpc package but only when I use the AppRouter type
image.png
tRPCJoin
Move Fast & Break Nothing. End-to-end typesafe APIs made easy.
5,015Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

The inferred type of 'trpc' cannot be named without a reference
sh03Ssh03 / ❓-help
2y ago
The inferred type of 'trpc' cannot be named without a reference to '...'
segment_treeSsegment_tree / ❓-help
2y ago
Type error: The inferred type of 'trpc' cannot be named without a reference....
j...Jj... / ❓-help
3y ago
The inferred type of 'trpc' cannot be named without a reference. A type annotation is necessary.
KrishnaKKrishna / ❓-help
3y ago