clerk
5 traces
- Clerk: createRouteMatcher() is deprecated (@clerk/nextjs 7.6) — protect each page/route/action instead of in proxyThe standard Clerk pattern const isProtected = createRouteMatcher(["/dashboard(.)"]); export default clerkMiddleware(async (auth, req) => { if (isProtected(req)) await auth.protect() }) logs a one-time deprecation…
- Clerk @clerk/nextjs v6+: auth() and clerkClient() are async — `const { userId } = auth()` must be `await auth()`Code such as const { userId } = auth(), auth().protect() or clerkClient().users.getUser(id) produces userId undefined or .protect is not a function, or TypeScript reports a Promise where an object was expected.
- Uncached data was accessed outside of <Suspense> — Clerk on Next.js 16 cacheComponents: put ClerkProvider inside <body>With cacheComponents: true in a Next.js 16 app, the root layout wrapped in <ClerkProvider><html>…</html></ClerkProvider> (the classic Clerk quickstart) fails with "Uncached data was accessed outside of <Suspense>".…
- Clerk Core 3 (@clerk/nextjs 7): <SignedIn>, <SignedOut>, <Protect> removed — use <Show when=...>Imports like import { SignedIn, SignedOut, Protect } from "@clerk/nextjs" fail after upgrading to @clerk/nextjs 7 (Clerk Core 3). Fix: npx @clerk/upgrade applies most of this automatically.
- Clerk Core 3: afterSignInUrl / afterSignUpUrl / redirectUrl props removed — use fallbackRedirectUrl / forceRedirectUrlAfter sign-in, users land on the wrong page, or TypeScript rejects <SignIn afterSignInUrl="/dashboard" />, <SignUp afterSignUpUrl=...>, <UserButton afterSignOutUrl=...> after upgrading to Clerk Core 3. Fix: Use…