trpc query failing in prod
I'm using trpc's use query together with nextjs 14's server components. The useQuery is in a client component. Everything works perfectly locally, including the productino build. However when I deploy to AWS via sst, it starts failing. Any idea why? This is the error:
SyntaxError: Unexpected non-whitespace character after JSON at position 2.
It shows up in the browser console through loggerLink.
When I inspect on the network tab, it does return the response with the right data. It seems like trpc on the front end isn't able to pass the right stuff to reavt to re-render?
Upon checking the response in detail, I see that there's "62 bf" and "0" at the beginning and the end of the json response respectively. This only happens in the deployed version. Not even on the locla built version.
SyntaxError: Unexpected non-whitespace character after JSON at position 2.
It shows up in the browser console through loggerLink.
When I inspect on the network tab, it does return the response with the right data. It seems like trpc on the front end isn't able to pass the right stuff to reavt to re-render?
Upon checking the response in detail, I see that there's "62 bf" and "0" at the beginning and the end of the json response respectively. This only happens in the deployed version. Not even on the locla built version.
