-
Notifications
You must be signed in to change notification settings - Fork 41
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Description
I am seeing the following type mismatch when using prisma v6.18 and the suggested type override:
Type error: Conversion of type 'import("/Users/xxx/projects/yyy/src/generated/prisma/client").PrismaClient' to type 'import("/Users/xxx/projects/yyy/node_modules/.pnpm/@premieroctet+next-admin@8.3.0_@prisma+client@6.18.0_prisma@6.18.0_magicast@0.3.5_types_a29d79696e6ea200772b80f9d443e3c4/node_modules/@premieroctet/next-admin/dist/generated/prisma/client").PrismaClient' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
Types of property '$transaction' are incompatible.
Type '{ <P extends Prisma.PrismaPromise<any>[]>(arg: [...P], options?: { isolationLevel?: TransactionIsolationLevel | undefined; } | undefined): Promise<UnwrapTuple<P>>; <R>(fn: (prisma: Omit<...>) => Promise<...>, options?: { ...; } | undefined): Promise<...>; }' is not comparable to type '{ <P extends Prisma.PrismaPromise<any>[]>(arg: [...P], options?: { isolationLevel?: any; } | undefined): Promise<UnwrapTuple<P>>; <R>(fn: (prisma: Omit<PrismaClient<never, GlobalOmitConfig | undefined, DefaultArgs>, "$connect" | ... 3 more ... | "$extends">) => Promise<...>, options?: { ...; } | undefined): Promise<...'.
Types of parameters 'arg' and 'fn' are incompatible.
Type '(prisma: Omit<PrismaClient<never, GlobalOmitConfig | undefined, DefaultArgs>, "$connect" | "$disconnect" | "$on" | "$transaction" | "$extends">) => Promise<...>' is not comparable to type 'any[]'.
Reproduction URL
n/a
Reproduction steps
import { PromisePageProps } from "@premieroctet/next-admin";
import { NextAdmin } from "@premieroctet/next-admin/adapters/next";
import { getNextAdminProps } from "@premieroctet/next-admin/appRouter";
import PageLoader from "@premieroctet/next-admin/pageLoader";
import type { PrismaClient } from "@premieroctet/next-admin";
import "@@/next-admin/nextAdmin.css";
import { notFound } from "next/navigation";
import options from "@@/next-admin/nextAdminOptions";
import prismaClient from "@/utils/prismaClient";
export default async function AdminPage(props: PromisePageProps) {
const params = await props.params;
const searchParams = await props.searchParams;
const nextAdminProps = await getNextAdminProps({
params: params.nextadmin,
searchParams,
basePath: "/admin/entities",
apiBasePath: "/api/admin/entities",
prisma: prismaClient as PrismaClient,
options,
});
return <NextAdmin pageLoader={<PageLoader />} {...nextAdminProps} />;
}Next router
App router
Next Admin version
3.8.0
Screenshots
Next Admin options
Logs
Browsers
Chrome
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working