Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

pnpm dev when running i cant load anything something to do with clerk #84

Open
alexgutscher26 opened this issue Oct 24, 2024 · 1 comment

Comments

@alexgutscher26
Copy link

Describe the bug
[1] ⨯ Error: Clerk: auth() was called but Clerk can't detect usage of clerkMiddleware() (or the deprecated authMiddleware()). Please ensure the following:
[1] - clerkMiddleware() (or the deprecated authMiddleware()) is used in your Next.js Middleware.
[1] - Your Middleware matcher is configured to match this route or page.
[1] - If you are using the src directory, make sure the Middleware file is inside of it.
[1]
[1] For more details, see https://clerk.com/docs/quickstarts/nextjs
[1]
[1] at getUserByClerkId (./src/lib/auth.ts:11:82)
[1] at LegalLayout (layout.tsx:40:83)
[1] at AsyncLocalStorage.run (node:async_hooks:346:14)
[1] at AsyncLocalStorage.run (node:async_hooks:346:14)
[1] at Object.Component [as apply] (layout.tsx:155:10)
[1] at stringify ()
[1] digest: "3931116347"
[1] GET /sw.js 500 in 155ms
[1] ⨯ Error: Clerk: auth() was called but Clerk can't detect usage of clerkMiddleware() (or the deprecated authMiddleware()). Please ensure the following:
[1] - clerkMiddleware() (or the deprecated authMiddleware()) is used in your Next.js Middleware.
[1] - Your Middleware matcher is configured to match this route or page.
[1] - If you are using the src directory, make sure the Middleware file is inside of it.
[1]
[1] For more details, see https://clerk.com/docs/quickstarts/nextjs
[1]
[1] at getUserByClerkId (./src/lib/auth.ts:11:82)
[1] at LegalLayout (layout.tsx:40:83)
[1] at AsyncLocalStorage.run (node:async_hooks:346:14)
[1] at AsyncLocalStorage.run (node:async_hooks:346:14)
[1] at Object.Component [as apply] (layout.tsx:155:10)
[1] at stringify ()
[1] digest: "3931116347"
[1] ⨯ Error: Clerk: auth() was called but Clerk can't detect usage of clerkMiddleware() (or the deprecated authMiddleware()). Please ensure the following:
[1] - clerkMiddleware() (or the deprecated authMiddleware()) is used in your Next.js Middleware.
[1] - Your Middleware matcher is configured to match this route or page.
[1] - If you are using the src directory, make sure the Middleware file is inside of it.
[1]
[1] For more details, see https://clerk.com/docs/quickstarts/nextjs
[1]
[1] at getUserByClerkId (./src/lib/auth.ts:11:82)
[1] at LegalLayout (layout.tsx:40:83)
[1] at AsyncLocalStorage.run (node:async_hooks:346:14)
[1] at AsyncLocalStorage.run (node:async_hooks:346:14)
[1] at Object.Component [as apply] (layout.tsx:155:10)
[1] at stringify ()
[1] digest: "3931116347"
[1] GET /sw.js 500 in 158ms

To Reproduce
Steps to reproduce the behavior:

  1. pnpm dev
  2. then error
Copy link

linear bot commented Oct 24, 2024

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant