This error occurs because Vercel's serverless environment requires a specific way of handling HTTP requests. Here's how to fix it:
Instead of exporting the NestJS app instance, you need to export a handler function The handler function should process HTTP requests and responses Use a singleton pattern to maintain the app instance across requests