Prisma to DrizzleORM Issue

Hi,

I just switched to DrizzleORM in my hobby project which is a Remix App hosted at Vercel using Turso.

Locally everything works fine, but when I deploy it to Vercel, I get the following error on login page.

TypeError: First parameter has member 'readable' that is not a ReadableStream.
    at node:internal/deps/undici/undici:13178:13
    at processTicksAndRejections (node:internal/process/task_queues:95:5)


My drizzle.config.ts :

import { config } from 'dotenv';
import { defineConfig } from 'drizzle-kit';

config({ path: '.env' });

export default defineConfig({
  schema: './app/db/schema.ts',
  out: './migrations',
  dialect: 'turso',
  dbCredentials: {
    url: process.env.TURSO_DATABASE_URL!,
    authToken: process.env.TURSO_AUTH_TOKEN!,
  },
});



My index.server.ts :

import { config } from 'dotenv';
import { drizzle } from 'drizzle-orm/libsql';
import { createClient } from '@libsql/client';
import * as schema from './schema.server';

config({ path: '.env' });

const client = createClient({
  url: process.env.TURSO_DATABASE_URL!,
  authToken: process.env.TURSO_AUTH_TOKEN!,
});

export const db = drizzle(client, { schema });


I'm having hard time to understand if this is a DrizzleORM issue or related to Remix on Vercel ? I was using Turso with Prisma and it was working fine by the way.
Was this page helpful?