Back to Clerk

`authMiddleware` import moved under `/server`

packages/upgrade/src/versions/core-2/nextjs/authmiddleware-import-change.md

latest571 B
Original Source

The authMiddleware import path has changed from @clerk/nextjs to @clerk/nextjs/server, as this is a helper that should be only used on the server side. You must update your import path in order for it to work correctly. Note as well that authMiddleware is deprecated as of this release, and we recommend using clerkMiddleware instead. Example below of the fix that needs to be made:

diff
- import { authMiddleware } from "@clerk/nextjs"
+ import { authMiddleware } from "@clerk/nextjs/server"