Hey everyone, I am extending the default prisma client in a monorepo but I am getting an error saying type is not portable.
import { PrismaClient } from '@company-name/prisma';
import extension from 'prisma-paginate';
const p: PrismaClient = new PrismaClient({
errorFormat: 'pretty',
log: ['info'],
datasources: {
db: {
url: process.env.POOLED_DATABASE_URL || process.env.DATABASE_URL,
},
},
});
const extendedP = p.$extends(extension);
export const prisma= extendedP;
the export in last line gives me an error saying The inferred type of 'prisma' cannot be named without a reference to '../../../../packages/prisma/node_modules/@prisma/client/runtime/library'. This is likely not portable. A type annotation is necessary.