79455218

Date: 2025-02-20 16:42:44
Score: 3
Natty:
Report link

Currently mongodb calls are not supported in Next.js middleware because middleware edge runtime nature is not compatible with mongodb adapter for connection.

There are alternatives to approach this here: https://medium.com/@chxiuy/mongodb-in-nextjs-overcoming-the-edge-runtime-middleware-hurdle-4beee31eaa30 and an official discussion about it here: https://github.com/vercel/next.js/discussions/46722

Reasons:
  • Blacklisted phrase (0.5): medium.com
  • Probably link only (1):
  • Low length (0.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Unclebigbay