I’m using NextJS app dir, with no src dir and Clerk.
Above I listed the location of the middleware page.
digest: "4053108776"
⨯ Error: Clerk: auth() was called but Clerk can't detect usage of clerkMiddleware() (or the deprecated authMiddleware()). Please ensure the following:
- clerkMiddleware() (or the deprecated authMiddleware()) is used in your Next.js Middleware.
- Your Middleware matcher is configured to match this route or page.
- If you are using the src directory, make sure the Middleware file is inside of it.
For more details, see https://clerk.com/docs/quickstarts/nextjs
at $$ACTION_0 (./lib/checkUser.ts:18:89)
at Header (./components/globals/Header.tsx:18:81)
at stringify (<anonymous>)
at stringify (<anonymous>)
digest: "4053108776"
GET /_next/static/chunks/app/invalidateCache.js.map 404 in 147ms
✓ Compiled in 43ms (330 modules)
I can’t figure it out how to deal with this. I’ve seen alor of posts on this forum, tried many, but not working.