Open-source SaaS Starter with User Roles & Admin Panel. Built using Next.js 14, Prisma, Neon, Auth.js v5, Resend, React Email, Shadcn/ui, Stripe, Server Actions.
Issue:
The Vercel build was failing due to incompatibility with the Edge environment in the current middleware implementation. The issue was identified when deploying the application, resulting in runtime errors specific to Edge functions.
Solution:
Updated the middleware code to ensure compatibility with Vercel's Edge environment. This includes modifying the API routes and request handling logic to align with Edge function requirements, ensuring seamless deployment and execution.
Changes Made
Refactored middleware.js to support Edge environment.
Updated API route handlers to use Edge-compliant syntax.
Description
Issue: The Vercel build was failing due to incompatibility with the Edge environment in the current middleware implementation. The issue was identified when deploying the application, resulting in runtime errors specific to Edge functions.
Solution: Updated the middleware code to ensure compatibility with Vercel's Edge environment. This includes modifying the API routes and request handling logic to align with Edge function requirements, ensuring seamless deployment and execution.
Changes Made