S
Supabase•3y ago
xamarot

Generating typescript schema not working

Im trying to generate typescript schema to use in my project. I put npx supabase gen types typescript --db-url postgresql://postgres:postgres@db_url:5432/postgres > ./src/schema.ts And after a while stuck on "connecting" I get error "Error: error running container". Why is this?
2 Replies
rphlmr âš¡
rphlmr ⚡•3y ago
Hello. This is a docker error. Really strange to see that for a remote DB 😬. What you can do to generate your types is : npx supabase login The access token it requires can be generated here : https://app.supabase.com/account/tokens Then : npx supabase gen types typescript --project-id yourProjectId >> ./src/schema.ts
Supabase | Supabase
Supabase Studio
xamarot
xamarotOP•3y ago
I'll try, thanks

Did you find this page helpful?