Prisma adapter import path error
Hello everyone,
I've started working with Better Auth, but I'm running into an issue with the Prisma adapter. I have the following code:
However, when I run npm run dev, I get this error in my terminal:
My IDE indicates that the import path is correct. Does anyone have an idea why this is happening or how to fix it?
I've started working with Better Auth, but I'm running into an issue with the Prisma adapter. I have the following code:
import { betterAuth } from "better-auth";
import { prismaAdapter } from "better-auth/adapters/prisma";
import { PrismaClient } from "@prisma/client";
const prisma = new PrismaClient();
export const auth = betterAuth({
database: prismaAdapter(prisma, {
provider: "mongodb",
}),
emailAndPassword: {
enabled: true,
},
});However, when I run npm run dev, I get this error in my terminal:
Error: Package subpath './*' is not defined by "exports" in /Users/lympe/Workspace/test/node_modules/better-auth/package.jsonMy IDE indicates that the import path is correct. Does anyone have an idea why this is happening or how to fix it?