Next.js Discord

Discord Forum

Turbo repo prisma error in the vercel build

Answered
Eyebrowed Thrush posted this in #help-forum
Open in Discord
Eyebrowed ThrushOP
I have a turbo repo with the prisma and next JS. When i am deploying it to the vercel then i am facing the types error.
Local build is working fine. Even in the fresh repo.




code of index.ts or @repo/db
export * from "@prisma/client";

db.ts of apps/web
import { PrismaClient } from "@repo/db"; const globalForPrisma = global as unknown as { prisma: PrismaClient }; export const db = globalForPrisma.prisma || new PrismaClient(); if (process.env.NODE_ENV !== "production") globalForPrisma.prisma = db;

Package.json of db
"scripts": { "db:generate": "npx prisma generate", "db:migrate": "npx prisma migrate dev --skip-generate", "db:push": "npx prisma db push --skip-generate", "generate": "prisma generate" },
Package.json of web app
"scripts": { "dev": "next dev --turbopack", "build": "npx turbo db:generate && pnpm velite && next build", "start": "next start", "lint": "next lint" },
Answered by Eyebrowed Thrush
@Dutch thanks for your support
The issue is in the vercel.json file it's running the default command even after I had overwrited from the vercel settings
View full answer

5 Replies

@Dutch do you have Job in @repo/db
Eyebrowed ThrushOP
Yes, I have it does only show for Job its shows for the every model Types
even if i remove Job then it will start showgin for the company
@Dutch Then something is wrong at your schema
Eyebrowed ThrushOP
Locally it's working fine
Even not single build is failing locally.
Eyebrowed ThrushOP
@Dutch thanks for your support
The issue is in the vercel.json file it's running the default command even after I had overwrited from the vercel settings
Answer