Having trouble using Payload CMS 3 with Next.js middleware (Node Error) #6506
-
Hi everyone, I'm trying to use payload cms 3.0 with
I'm not very familiar with this error. Has anyone else faced this when using Payload CMS with middleware in Next.js? Any guidance on how to fix it or what plugin might be needed would be greatly appreciated! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
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. |
Beta Was this translation helpful? Give feedback.
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.