drizzle-team / drizzle-kit-mirror

Docs and issues repository for drizzle-kit
290 stars 17 forks source link

Most commands fail with missing drizzle-studio/localhost-key.pem #317

Open jckw opened 5 months ago

jckw commented 5 months ago

I'm new to Drizzle and setting up a project with a blank DB.

When I run yarn drizzle-kit generate:pg it fails with an error regarding a missing key from drizzle-studio. I haven't used it.

$ yarn drizzle-kit generate:pg
yarn run v1.22.19
$ /Users/jack/Documents/Projects/outro-turbo/node_modules/.bin/drizzle-kit generate:pg
drizzle-kit: v0.20.14
drizzle-orm: v0.29.3

No config path provided, using default 'drizzle.config.ts'
Reading config file '/Users/jack/Documents/Projects/outro-turbo/packages/db/drizzle.config.ts'
node:internal/process/promises:288
            triggerUncaughtException(err, true /* fromPromise */);
            ^

[Error: ENOENT: no such file or directory, open '/Users/jack/Library/Application Support/drizzle-studio/localhost-key.pem'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/Users/jack/Library/Application Support/drizzle-studio/localhost-key.pem'
}

Node.js v18.18.2
error Command failed with exit code 1.

I have tried this with both ?sslmode=disable and without since I figured maybe it's trying to send SSL requests, but both ways error.

This also occurs with yarn drizzle-kit introspect:pg, check:pg, etc. I haven't checked other DB providers.

Possibly a dupe of https://github.com/drizzle-team/drizzle-orm/issues/1880, but I figured this is the right repo to put this in. Let me know if that's not the case.

diegoalzate commented 5 months ago

+1

kimdanielarthur-cowlabs commented 5 months ago

I just added empty files localhost-key.pem and localhost.pem in the application support folder for drizzle and it seems to work ok without actual valid pem's

camilovegag commented 5 months ago

I just added empty files localhost-key.pem and localhost.pem in the application support folder for drizzle and it seems to work ok without actual valid pem's

This works for me! Path was Library/Application\ Support/drizzle-studio/ on my mac

jckw commented 4 months ago

I just contributed to the bounty on this issue:

https://until.dev/bounty/drizzle-team/drizzle-kit-mirror/317

The current bounty for completing it is $10.00 if it is closed within 1 month, and decreases after that.

jckw commented 2 months ago

This problem persists after 2 months. Seem pretty core to the library being usable for new users!