Open igoramadas opened 20 hours ago
drizzle-orm
0.35.0
drizzle-kit
0.26.1
Since updating from 0.34.x to 0.35.0, I'm getting the following error when building my app:
Argument of type 'Sql<{}>' is not assignable to parameter of type '"Please install postgres to allow Drizzle ORM to connect to the database"'
But postgres (postgres-js) is already installed.
A sample code that triggers the error for me:
import {drizzle, type PostgresJsDatabase} from "drizzle-orm/postgres-js" import postgres from "postgres" import * as schema from "./schema.js" import settings from "./settings.json" const pg = postgres(settings.database, {max: 10, onnotice: () => {}}) const client:PostgresJsDatabase<typeof schema> = drizzle(pg) // build error here
My drizzle.config.json file:
{ "dialect": "postgresql", "schema": "./src/database/schema.ts", "out": ".drizzle" }
I have cleared the node_modules and my Nuxt output and built everything from scratch, but error is still there.
Reverting to 0.34.1 fixes the problem for now.
No response
I faced the same issue. In my case I am using pg package. I solved it by installing @types/pg
pg
@types/pg
@igoramadas could you please make reproduction repo or share your current one?
What version of
drizzle-orm
are you using?0.35.0
What version of
drizzle-kit
are you using?0.26.1
Describe the Bug
Since updating from 0.34.x to 0.35.0, I'm getting the following error when building my app:
But postgres (postgres-js) is already installed.
A sample code that triggers the error for me:
My drizzle.config.json file:
I have cleared the node_modules and my Nuxt output and built everything from scratch, but error is still there.
Reverting to 0.34.1 fixes the problem for now.
Expected behavior
No response
Environment & setup