Ramparts
Ramparts
PPrisma
Created by Ramparts on 5/7/2025 in #help-and-questions
Problem with prisma-client generator on vercel with a monorepo
obviously not copying the native env files over at the same time. I did try the new rust based one, but I have other issues to fix with that first
12 replies
PPrisma
Created by Ramparts on 5/7/2025 in #help-and-questions
Problem with prisma-client generator on vercel with a monorepo
yeah, found similar on github, last night after posting: https://github.com/prisma/prisma/discussions/19498#discussioncomment-12976746
12 replies
PPrisma
Created by Ramparts on 5/7/2025 in #help-and-questions
Problem with prisma-client generator on vercel with a monorepo
prisma generate --no-hints
prisma generate --no-hints
12 replies
PPrisma
Created by Ramparts on 5/7/2025 in #help-and-questions
Problem with prisma-client generator on vercel with a monorepo
following command is run as part of build
12 replies
PPrisma
Created by Ramparts on 5/7/2025 in #help-and-questions
Problem with prisma-client generator on vercel with a monorepo
import { PrismaClient } from "@company/database";

function createPrisma() {
return new PrismaClient();
}

const globalForPrisma = global as unknown as {
prisma: ReturnType<typeof createPrisma>;
};

export const prisma = globalForPrisma.prisma ?? createPrisma();

if (process.env.NODE_ENV !== "production") globalForPrisma.prisma = prisma;

export default prisma;
import { PrismaClient } from "@company/database";

function createPrisma() {
return new PrismaClient();
}

const globalForPrisma = global as unknown as {
prisma: ReturnType<typeof createPrisma>;
};

export const prisma = globalForPrisma.prisma ?? createPrisma();

if (process.env.NODE_ENV !== "production") globalForPrisma.prisma = prisma;

export default prisma;
12 replies
PPrisma
Created by Ramparts on 5/7/2025 in #help-and-questions
Problem with prisma-client generator on vercel with a monorepo
loaded in my app
12 replies
PPrisma
Created by Ramparts on 5/7/2025 in #help-and-questions
Problem with prisma-client generator on vercel with a monorepo
database is in a package, "packages/database"
12 replies
PPrisma
Created by Ramparts on 5/7/2025 in #help-and-questions
Problem with prisma-client generator on vercel with a monorepo
No description
12 replies