azure199
azure199
Explore posts from servers
DTDrizzle Team
Created by azure199 on 9/7/2023 in #help
Cannot find driver! mysql2 or pg.
I'm trying to run drizzle-kit studio can get this error: Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'mysql2' imported from C:\Users\rober\code\projects\drizsup\node_modules\drizzle-orm\mysql2\index.mjs Here is my drizzle.config.ts: import type { Config } from "drizzle-kit"; export default { schema: "./src/lib/schema.ts", out: "./src/lib/db", driver: "mysql2", dbCredentials: { connectionString: process.env.DATABASE_URL, }, } satisfies Config; If I remove the driver option it says no driver option found, if I add driver: mysql2 or pg it says cannot find driver mysql2 or pg? Looked through other help questions couldn't find a solution.
14 replies
DTDrizzle Team
Created by azure199 on 9/7/2023 in #help
Connection SSL/TLS
I'm trying to introspect my database from planetscale but when I run the command I get an error of: Ignoring invalid configuration option passed to Connection: ssl{'rejectUnauthorized':true}. This is currently a warning, but in future versions of MySQL2, an error will be thrown if you pass an invalid configuration option to a Connection C:\Users\rober\code\projects\drizsup\node_modules\drizzle-kit\index.cjs:35618 Error: unknown error: Code: UNAVAILABLE server does not allow insecure connections, client must use SSL/TLS. I got the string from planetscale under node.js connection. I also tried sslaccept=strict. String here: DATABASE_URL='mysql://cmbv6127rur27iela7w8:[password]@aws.connect.psdb.cloud/prispractice?ssl={"rejectUnauthorized":true}' Config file: import type { Config } from "drizzle-kit"; export default { schema: "./src/lib/schema.ts", out: "./src/lib/db", driver: "mysql2", dbCredentials: { connectionString: "mysql://cmbv6127rur27iela7w8:[password]@aws.connect.psdb.cloud/prispractice?ssl{'rejectUnauthorized':true}", }, } satisfies Config; What would be the fix? It would be nice since the error tells you its invalid that it show valid options to choose from.
8 replies