Path: /sdk/ts/orm/prisma
import { PrismaClient } from "@prisma/client";
import { PrismaLibSQL } from "@prisma/adapter-libsql";
import { createClient } from "@libsql/client";
const libsql = createClient({
url: process.env.TURSO_DATABASE_URL,
authToken: process.env.TURSO_AUTH_TOKEN,
});
const adapter = new PrismaLibSQL(libsql);
const prisma = new PrismaClient({ adapter });
The createClient function returns an object of type Client. However, the PrismaLibSQL constructor expects an object of type Config. This causes a type mismatch and the build fails.
The argument passed to the PrismaLibSQL constructor should be the configuration object itself, not the client instance returned by createClient.