TanStackT
TanStack3mo ago
1 reply
popular-magenta

Error using clerk

As shown in the screenshot, im trying to setup clerk in tanstack and its not working. I think theres a bug in tanstack as clerk cant find the session cookies.

My start.ts:
import { clerkMiddleware } from "@clerk/tanstack-react-start/server";
import { createStart } from "@tanstack/react-start";

export const startInstance = createStart(() => {
    return {
        requestMiddleware: [
            clerkMiddleware({
                publishableKey: process.env.VITE_CLERK_PUBLISHABLE_KEY,
                secretKey: process.env.CLERK_SECRET_KEY,
                signUpFallbackRedirectUrl: "/spaces",
            }),
        ],
    };
});

export default startInstance;

package.json:
"dependencies": {
        "@clerk/tanstack-react-start": "^0.26.5",
        "@tanstack/react-router": "^1.133.36",
        "@tanstack/react-start": "^1.134.0",
        "react": "^19.2.0",
        "react-dom": "^19.2.0"
    },
image.png
Was this page helpful?