Skip to content

Honeybadger and ClerkJs are not compatible in a NextJs application #1255

Open
@subzero10

Description

@subzero10

What are the steps to reproduce this issue?

  1. create a nextjs app using the app router and the src folder
  2. configure honeybadger using the nextjs documentation guide
  3. configure env variables on Vercel

What happens?

Locally, with npm run dev all work normally.
After deploying to Vercel, I am getting an error.

What were you expecting to happen?

To not throw an error.

Any logs, error output, etc?

Error: Clerk: auth() was called but Clerk can't detect usage of authMiddleware(). Please ensure the following:
- 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/get-started-with-nextjs.

    at /var/task/.next/server/chunks/5961.js:12:47984
    at /var/task/.next/server/chunks/5961.js:12:45968
    at rx (/var/task/.next/server/chunks/5961.js:14:87)
    at d (/var/task/.next/server/app/page.js:1:4354)
    at /var/task/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:15:8530
    at /var/task/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:15:8659
    at async rx (/var/task/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:15:8353)
    at async /var/task/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:15:7389
    at async Promise.all (index 0)
    at async rx (/var/task/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:15:7160)

What versions are you using?

Package Name: @honeybadger-io/nextjs
Package Version: 5.8.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugnextjs@honeybadger-io/nextjs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions