middleware error with minimal-react example
hello! I tried to use the minimal-react version, but I get an error - it says that
'middleware'
does not exist on CreateHTTPHandlerOptions<...>
. Am I doing something wrong or is it broken?6 Replies
You may need to upgrade your tRPC version, that feature was released quite recently
We're doing quite frequent releases without breaking changes so you should be safe to just update to the latest 10.x version
Yeah sorry wasn’t clear - I was trying to use the minimal-react example from the repo (aka I cloned the whole monorepo and tried to run the example)
So it’s definitely v10 :)
Got it, yes I would hope that’s on the latest version! 😝
Starting fine on my machine, make sure you do
(though I reserve the right for those first 2 steps to not be necessary)
Yep works all fine on my work laptop, will have to wait until I get home to try again properly
It was super strange though. Wasn’t saying cors wasn’t installed or anything, just refusing to believe that middleware was an option you could pass
Make sure you pull the latest main. There might have been an issue when you tried it which is now fixed
Got it working - not 100% sure what is was but I synced my fork and ran
pnpm build
and it's working. I think the issue might have been not running the build command in the root dir