Drizzle TeamDT
Drizzle Team3y ago
2 replies
wlvz

Cannot read properties of undefined (reading 'connectionString')

In my drizzle.config.ts I have the code:
import type { Config } from "drizzle-kit";
import 'dotenv/config'

export default {
  schema: "./lib/db/schema.ts",
  out: "./drizzle",
  connectionString: process.env.DATABASE_URL,
  driver: "mysql2",
} satisfies Config;

and when I go to run drizzle-kit introspect:mysql I get the error:
TypeError: Cannot read properties of undefined (reading 'connectionString').

I checked my .env.local and DATABASE_URL is defined:
DATABASE_URL='mysql://abcd@aws.connect.psdb.cloud/username?ssl={"rejectUnauthorized":true}'
Was this page helpful?