App router tRPC client side query not working with nextjs basePath
Hi,
I'm using basePath option with nextJS, which can't be avoided for my project, and it appears to be causing conflicts with the client side.
When I remove the basepath, client side useQuery works perfectly. Add it back in, and it breaks.
Server side queries work regardless, no issue whether basePath option is enabled in next config or not.
The network traffic says it is going to localhost:3002/api/ rather than localhost:3002/portal/api
my next-config.js:
I'm using trpc/react
And calling it on client:
Any suggestions as to why this might be?
1 Reply
did you happen to solve this?