© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•4y ago•
4 replies
GaryLake

`supabase gen types typescript` URL is not valid connection string

I'm trying to use
supabase gen types typescript
supabase gen types typescript
on my remote database on platform but I cannot get it to accept a --db-url flag.

I have tried:

supabase gen types typescript --db-url '<project-id>' > database.types.ts
supabase gen types typescript --db-url '<project-id>' > database.types.ts

supabase gen types typescript --db-url '<project-id>.supabase.co' > database.types.ts
supabase gen types typescript --db-url '<project-id>.supabase.co' > database.types.ts

supabase gen types typescript --db-url 'db.<project-id>.supabase.co' > database.types.ts
supabase gen types typescript --db-url 'db.<project-id>.supabase.co' > database.types.ts

supabase gen types typescript --db-url 'https://<project-id>.supabase.co' > database.types.ts
supabase gen types typescript --db-url 'https://<project-id>.supabase.co' > database.types.ts

supabase gen types typescript --db-url 'https://db.<project-id>.supabase.co' > database.types.ts
supabase gen types typescript --db-url 'https://db.<project-id>.supabase.co' > database.types.ts


And I always get
Error: URL is not a valid Supabase connection string.
Error: URL is not a valid Supabase connection string.


I have copy-pasted the project ID so I know that's correct.

Also, can I assume this isn't going to make any types for db functions that return a table?
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

npx supabase gen types typescript broke
SupabaseSSupabase / help-and-questions
4mo ago
Supabase gen types
SupabaseSSupabase / help-and-questions
7mo ago
Supabase gen types fails
SupabaseSSupabase / help-and-questions
4y ago
gen types - 'error during connection'
SupabaseSSupabase / help-and-questions
4y ago