Turbo repo prisma error in the vercel build
Answered
Eyebrowed Thrush posted this in #help-forum
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
db.ts of apps/web
Package.json of db
Package.json of web app
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
@Dwarf Hotot 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
The issue is in the vercel.json file it's running the default command even after I had overwrited from the vercel settings
5 Replies
@Dwarf Hotot 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
even if i remove Job then it will start showgin for the company
@Eyebrowed Thrush 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
Dwarf Hotot
Then something is wrong at your schema
@Dwarf Hotot Then something is wrong at your schema
Eyebrowed ThrushOP
Locally it's working fine
Even not single build is failing locally.
Even not single build is failing locally.
Eyebrowed ThrushOP
@Dwarf Hotot 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
The issue is in the vercel.json file it's running the default command even after I had overwrited from the vercel settings
Answer