Issues with NextJS + Turso + DrizzleORM + LuciaAuth

Hello! I am having issues. I recently have been using the planetscale related libs but since they are sunsetting their hobby tier I switched to turso. I changed all the schemas to match the correct types and whatnot.

This is where I connect to my db

// db.js
import { drizzle } from "drizzle-orm/libsql";
import { createClient } from "@libsql/client";
export { default as PermissionInteger, MappedPermissions } from "./permissions";

import * as authSchema from "./schemas/auth";
import * as teamSchema from "./schemas/team";
import * as experienceSchema from "./schemas/experience";
import { DrizzleSQLiteAdapter } from "@lucia-auth/adapter-drizzle";

import * as roblox from "./providers/roblox";

export const connection = createClient({
  url: process.env.TURSO_DB_URL!,
  authToken: process.env.TURSO_AUTH_TOKEN,
});

export const providers = {
  roblox,
};

export const db = drizzle(connection, {
  schema: { ...authSchema, ...teamSchema, ...experienceSchema },
});

export const dbAdapter = new DrizzleSQLiteAdapter(
  // @ts-ignore
  db,
  authSchema.session,
  authSchema.user
);

export { authSchema, teamSchema, experienceSchema };


Whenever I attempt to build with nextjs I get this entire build log:
Was this page helpful?