Thak you for replying. Actually, I already did that but still it failed to build nextjs app on vercel. I am using “use server” everywhere almost. Integrated middleware.ts along with auth.js(v5). This is actual build error on my vercel deployment,
Dynamic Code Evaluation (e. g. 'eval', 'new Function', 'WebAssembly.compile') not allowed in Edge Runtime
Learn More: https://nextjs.org/docs/messages/edge-dynamic-code-evaluation
The error was caused by importing 'mongoose/dist/browser.umd.js' in './lib/database/index.ts'.`
If you know this issue, please let me know. I am unable to figure this out from past 30 days. Now, If i will not able to figure this out in next 2 days then I have decided to move to ReactJS over NextJS.