Deployment to vercel failing

I have accelerate activated, i can't deploy to vercel i always get this bug please help (im using mongodb/nextjs) this is my package.json
"scripts": {
"dev": "next dev --turbo",
"build": "next build",
"start": "next start",
"lint": "next lint",
"postinstall": "prisma generate",
"vercel-build": "prisma generate && next build",
"prisma:generate": "prisma generate"
},
"scripts": {
"dev": "next dev --turbo",
"build": "next build",
"start": "next start",
"lint": "next lint",
"postinstall": "prisma generate",
"vercel-build": "prisma generate && next build",
"prisma:generate": "prisma generate"
},
this is my db.ts
import { PrismaClient } from "@prisma/client/edge";
import { withAccelerate } from "@prisma/extension-accelerate";

const prismaClientSingleton = () => {
return new PrismaClient().$extends(withAccelerate());
};

declare global {
var prismaGlobal: undefined | ReturnType<typeof prismaClientSingleton>;
}

const prisma = globalThis.prismaGlobal ?? prismaClientSingleton();

export default prisma;

if (process.env.NODE_ENV !== "production") globalThis.prismaGlobal = prisma;
import { PrismaClient } from "@prisma/client/edge";
import { withAccelerate } from "@prisma/extension-accelerate";

const prismaClientSingleton = () => {
return new PrismaClient().$extends(withAccelerate());
};

declare global {
var prismaGlobal: undefined | ReturnType<typeof prismaClientSingleton>;
}

const prisma = globalThis.prismaGlobal ?? prismaClientSingleton();

export default prisma;

if (process.env.NODE_ENV !== "production") globalThis.prismaGlobal = prisma;
No description
6 Replies
bayrem🪽
bayrem🪽OP9mo ago
pls help guys ♥ a major project is stuck and im running out of time
Unknown User
Unknown User9mo ago
Message Not Public
Sign In & Join Server To View
bayrem🪽
bayrem🪽OP9mo ago
one sec ill try i've been fighting this bug for 12 hours didn't sleep
Unknown User
Unknown User9mo ago
Message Not Public
Sign In & Join Server To View
bayrem🪽
bayrem🪽OP9mo ago
done it, didn't work i added this to the json didn't work
Unknown User
Unknown User9mo ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server