DT
Drizzle Team•17mo 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•17mo ago
Pretty sure you need to put an npx in front of it I.e. npx drizzle-kit generate:pg for example
SteveS
SteveSOP•17mo ago
Oh, nice yeah that fixed it Any idea why I'm getting "Host and database required" given my config?
SteveS
SteveSOP•17mo ago
SteveS
SteveSOP•17mo ago
Schred
Schred•17mo ago
Yeah I've been getting that same error when trying to push:pg, can't help you with that, sorry
SteveS
SteveSOP•17mo ago
Damn, maybe the developer will see this thread. Fingers crossed
Ahmed
Ahmed•17mo 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
SteveSOP•17mo ago
Same issue
Ahmed
Ahmed•17mo ago
Try providing the connectionString only
SteveS
SteveSOP•17mo ago
Yeah, now it works. Do you have any idea how to deal with:
Ahmed
Ahmed•17mo ago
Replace this in the end of your connection string ?ssl={"rejectUnauthorized":true} Ignore this I thought you were using Planetscale 💀
SteveS
SteveSOP•17mo ago
I am
SteveS
SteveSOP•17mo ago
I did that and I still get an error:
Ahmed
Ahmed•17mo ago
Is this the only error message you got ?
SteveS
SteveSOP•17mo 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
Want results from more Discord servers?
Add your server