errors
Good day,
I’m using clerk for the first time. but after basic setup it’s not redirecting to the sign in page. In the latest version they use
import { clerkMiddleware } from "@clerk/nextjs/server";
export default clerkMiddleware();
export const config = {
matcher: ["/((?!.*\..*|_next).*)", "/", "/(api|trpc)(.*)"],
};
and it’s not working for me. I saw in a youtube video they are using authMiddleware()
instead of clerkMiddleware()
. I tried to use authMiddleware()
but it’s giving me bruch of errors [in the image] but it’s redirecting me to the sign in page.
‘authMiddleware’ is deprecated.ts(6385)
authMiddleware.d.ts(85, 4): The declaration was marked as deprecated here.
SO I probably should use clerkMiddleware()
. What should I do to fix this issue?
nazmul Hassan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.