unable to use the `push` command

I keep getting this error.
adam@Adams-MacBook-Pro blackbird % pnpm drizzle-kit push
No config path provided, using default 'drizzle.config.ts'
Reading config file '/Users/adam/Documents/Development/projects/blackbird/drizzle.config.ts'
Error Either connection "url" or "host", "database" are required for PostgreSQL database connection
adam@Adams-MacBook-Pro blackbird % pnpm drizzle-kit push
No config path provided, using default 'drizzle.config.ts'
Reading config file '/Users/adam/Documents/Development/projects/blackbird/drizzle.config.ts'
Error Either connection "url" or "host", "database" are required for PostgreSQL database connection
and this is my config file.
import 'dotenv/config';

import { defineConfig } from 'drizzle-kit';

export default defineConfig({
dialect: 'postgresql',
schema: './src/lib/server/schema/*',
out: 'drizzle',
dbCredentials: {
url: process.env.DATABASE_URL as string
}
});
import 'dotenv/config';

import { defineConfig } from 'drizzle-kit';

export default defineConfig({
dialect: 'postgresql',
schema: './src/lib/server/schema/*',
out: 'drizzle',
dbCredentials: {
url: process.env.DATABASE_URL as string
}
});
1 Reply
gonedark
gonedarkOP4mo ago
I provided the url field so I don't know why it's not working.

Did you find this page helpful?