DT
Drizzle Team•3w ago
Efkan

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)
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!,
},
});
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 });
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.
5 Replies
Efkan
EfkanOP•3w ago
I also updated my libsql version to 0.14.0 while switching to DrizzleORM ? Do you think this might be it ?
Efkan
EfkanOP•3w ago
Downgrading my @libsql/client to 0.5.6 fixed this, but it is suggested to use at least the 0.10.0 version here: https://github.com/drizzle-team/drizzle-orm/releases/tag/0.34.0 "@libsql/[email protected] or higher if you are using the migrate function. For other use cases, you can continue using previous versions(But the suggestion is to upgrade)"
GitHub
Release 0.34.0 · drizzle-team/drizzle-orm
Breaking changes and migrate guide for Turso users If you are using Turso and libsql, you will need to upgrade your drizzle.config and @libsql/client package. This version of drizzle-orm will only...
Efkan
EfkanOP•3w ago
This is very weird 🤔
Matt
Matt•3w ago
I'm having the same issue, and another user on the Turso discord noted it as well @Efkan Did you manage to get this resolved? I'm still having the same issue as you with the latest release
Efkan
EfkanOP•3w ago
Unfortunately, its the same. Btw, similar deployment on Cloudflare works but on Vercel doesnt work
Want results from more Discord servers?
Add your server