TanStackT
TanStack8mo ago
4 replies
awake-maroon

ClerkHandler type (Clerk+Convex+TSS) error when moving to alpha branch

Cross post from a thread in the general chat, but I believe this might be a larger error so I'm publishing here. Let me know if you all would like me to submit a github issue.

Error:
Within server.tsx:
 Type 'RequestHandler' is not assignable to type 'EventHandler<EventHandlerRequest, any>'.
    Types of parameters 'ctx' and 'event' are incompatible.
      Property 'request' is missing in type 'H3Event<EventHandlerRequest>' but required in type '{ request: Request; }'

This previously leverage 'getRouterManifest' but this package was removed on alpha.

Here's the server.tsx config that's throwing:

import {
  createStartHandler,
  defaultStreamHandler,
} from "@tanstack/react-start/server";
import { getRouterManifest } from "@tanstack/react-start/router-manifest";
import { createRouter } from "./router";
import { createClerkHandler } from "@clerk/tanstack-react-start/server";

export default createClerkHandler(
  createStartHandler({
    createRouter,
    getRouterManifest,
  })
)(defaultStreamHandler);
Was this page helpful?