The Edge Function "middleware" size is 1.01 MB and your plan size limit is 1 MB

The problem in my case was related to prisma adapter

// import { Pool, neonConfig } from "@neondatabase/serverless"
// import { PrismaNeon } from "@prisma/adapter-neon"
import { PrismaClient } from "@prisma/client"
import axios, { AxiosError } from "axios"
import { NextResponse } from "next/server"
// import ws from "ws"

// https://neon.tech/docs/guides/prisma
// neonConfig.webSocketConstructor = ws
// const connectionString = `${process.env.POSTGRES_URL}`

const prismaClientSingleton = () => {
  // const neon = new Pool({ connectionString })
  // const adapter = new PrismaNeon(neon)
  // return new PrismaClient({ adapter })
  return new PrismaClient()
}

We cannot put prisma to run on edge :expressionless: