DT
Drizzle Team•10mo ago
SteveS

unknown command: drizzle-kit

Can't seem to get the command to work. Followed the instructions of the quick start guide. Any ideas?
15 Replies
Schred
Schred•10mo ago
Pretty sure you need to put an npx in front of it I.e. npx drizzle-kit generate:pg for example
SteveS
SteveS•10mo ago
Oh, nice yeah that fixed it Any idea why I'm getting "Host and database required" given my config?
SteveS
SteveS•10mo ago
SteveS
SteveS•10mo ago
Schred
Schred•10mo ago
Yeah I've been getting that same error when trying to push:pg, can't help you with that, sorry
SteveS
SteveS•10mo ago
Damn, maybe the developer will see this thread. Fingers crossed
Ahmed
Ahmed•10mo ago
If you're pushing to your database, drizzle will read your config file. the config doesn't have the ability to read your .env. In order the fix it you need the dotenv package. Simply import it at the top of the file import 'dotenv/config';
SteveS
SteveS•10mo ago
Same issue
Ahmed
Ahmed•10mo ago
Try providing the connectionString only
SteveS
SteveS•10mo ago
Yeah, now it works. Do you have any idea how to deal with:
Ahmed
Ahmed•10mo ago
Replace this in the end of your connection string ?ssl={"rejectUnauthorized":true} Ignore this I thought you were using Planetscale 💀
SteveS
SteveS•10mo ago
I am
SteveS
SteveS•10mo ago
I did that and I still get an error:
Ahmed
Ahmed•10mo ago
Is this the only error message you got ?
SteveS
SteveS•10mo ago
Yeah Uh, I reran it without changing anything and it worked I don't know if something was cached or whatever, but that's neat