Skip to content

Commit f37e476

Browse files
authored
fix(db-postgres): esm compatible import of pg (#8758)
Fixes this error that doesn't occur in our monorepo but on users projects. <img width="1040" alt="image" src="https://github.com/user-attachments/assets/6b410959-9108-4022-ae0a-64bc4be6de67">
1 parent 90bca15 commit f37e476

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/drizzle/src/postgres/createDatabase.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export const createDatabase = async function (this: BasePostgresAdapter, args: A
5454
}
5555

5656
// import pg only when createDatabase is used
57-
const pg = await import('pg')
57+
const pg = await import('pg').then((mod) => mod.default)
5858

5959
const managementClient = new pg.Client(managementClientConfig)
6060

0 commit comments

Comments
 (0)