Next.js Discord

Discord Forum

Problem with Prisma and deployement on vercel (NEXTJS PROJECT)

Unanswered
Sloth bear posted this in #help-forum
Open in Discord
Avatar
Sloth bearOP
have this problem where when i run
npx prisma migrate

it does remove all errors and the code gets all clean from errors.
but when i try to deploy on vercel or to run
npm run build

the error gets back.
Image
Image
Image

1 Reply

Avatar
Giant panda
try adding a postinstall script to yout package.json file that runs prisma generate after the build process. place this snippet in the scripts section:
"postinstall" : "prisma generate"