Issue with trpc fetch when trying to pass Clerk auth to context
I'm currently trying to add Clerk auth to my trpc context, but I just keep getting this error:
Error: Unexpected token '<', "<!DOCTYPE "... is not valid JSON
This is my code:
context.ts
import { NextRequest } from 'next/server'
import { getAuth } from '@clerk/nextjs/server'
import { FetchCreateContextFnOptions } from '@trpc/server/adapters/fetch'
export function createContext(opts: FetchCreateContextFnOptions) {