ReferenceError: Cannot access 'appRouter' before initialization
Hi friends im having trouble implementing a "protected" or "private" procedure in TRPC using Next.js 14 with NextAuth.
2 Replies
If i understand this correctly it should be setting a context for trpc. The context is the session object from the nextauth function
getServerSession
This likely means you have a circular import
Also not sure what you're doing in that last file, but that's definitely not how you use createCaller, I think you need to revisit the docs