Skip to content

Having trouble using Payload CMS 3 with Next.js middleware (Node Error) #6506

Discussion options

You must be logged in to vote

Ref: https://nextjs.org/docs/app/building-your-application/routing/middleware#runtime

Middleware currently only supports the Edge runtime. The Node.js runtime can not be used.

I think you should move your auth check into a higher level layout instead.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@m7medVision
Comment options

Answer selected by m7medVision
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants