[ Server ] Error: Clerk: auth() was called but Clerk can't detect usage of clerkMiddleware(). Please ensure the following: - clerkMiddleware() 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 #4827
Labels
needs-triage
A ticket that needs to be triaged by a team member
Preliminary Checks
I have reviewed the documentation: https://clerk.com/docs
I have searched for existing issues: https://github.com/clerk/javascript/issues
I have not already reached out to Clerk support via email or Discord (if you have, no need to open an issue here)
This issue is not a question, general help request, or anything other than a bug report directly related to Clerk. Please ask questions in our Discord community: https://clerk.com/discord.
Reproduction
https://github.com/amin-xiv/Clerk-Issue
Publishable key
pk_test_bGlnaHQtY2ljYWRhLTM4LmNsZXJrLmFjY291bnRzLmRldiQ
Description
I have just got introduced to Clerk auth, and I'm using Next.js. I'm following this video LINE BY LINE (https://www.youtube.com/watch?v=pjFbcXi8eCM) which is the official Clerk tutorial on Next.js, but I'm getting this error:
[ Server ] Error: Clerk: auth() was called but Clerk can't detect usage of clerkMiddleware(). Please ensure the following:
For more details, see https://clerk.com/docs/quickstarts/nextjs
Steps to reproduce:
Expected behavior:
It should work since I'm following the tutorial and the docs as stated in detail.
Actual behavior:
I get this error:
Environment
The text was updated successfully, but these errors were encountered: