premieroctet / next-crud

Full-featured CRUD routes for Next.js

Home Page:https://next-crud.js.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

next-crud 2.2.0 is not compatible with Prisma 4

jberrydev opened this issue · comments

If using version 2.2.0 of next-crud and prisma >= 4, you receive an error on the PrismaAdapter:

Cannot convert undefined or null to object

Error happens here on line 5

import NextCrud, { PrismaAdapter } from "@premieroctet/next-crud";
import { prismaClient } from "../../server";

const handler = NextCrud({
  adapter: new PrismaAdapter({
    prismaClient: prismaClient,
  }),
});

export default handler;

Fixed in 2.3.1, there is a small breaking change specified in the release note.