Generate types

Then I try to generate types I get this error.
➜ lahore git:(admin/initial-setup) ✗ npx supabase gen types typescript --debug
Supabase CLI 2.33.7
2025/08/03 13:19:00 HTTP GET: https://api.supabase.com/v1/projects
Selected project: ...
2025/08/03 13:19:01 HTTP GET: https://api.supabase.com/v1/projects/.../types/typescript?included_schemas=public
failed to retrieve generated types: {"message":"{\"message\":\"Legacy API keys are disabled\",\"hint\":\"Your legacy API keys (anon, service_role) were disabled on 2025-07-27T07:20:23.326504+00:00. Re-enable them in the Supabase dashboard, or use the new publishable and secret API keys.\"}"}
➜ lahore git:(admin/initial-setup) ✗
➜ lahore git:(admin/initial-setup) ✗ npx supabase gen types typescript --debug
Supabase CLI 2.33.7
2025/08/03 13:19:00 HTTP GET: https://api.supabase.com/v1/projects
Selected project: ...
2025/08/03 13:19:01 HTTP GET: https://api.supabase.com/v1/projects/.../types/typescript?included_schemas=public
failed to retrieve generated types: {"message":"{\"message\":\"Legacy API keys are disabled\",\"hint\":\"Your legacy API keys (anon, service_role) were disabled on 2025-07-27T07:20:23.326504+00:00. Re-enable them in the Supabase dashboard, or use the new publishable and secret API keys.\"}"}
➜ lahore git:(admin/initial-setup) ✗
However I am using the "the new publishable and secret API keys".
No description
3 Replies
garyaustin
garyaustin4w ago
GitHub
Bug: gen types · Issue #3966 · supabase/cli
Describe the bug When attempting to generate types using the Supabase CLI after enabling the new API key and disabling legacy API keys, the process fails To Reproduce Steps to reproduce the behavio...
Martin Carlsson
Martin CarlssonOP4w ago
Thanks!
garyaustin
garyaustin4w ago
You might try 2.33.9 if it is out.

Did you find this page helpful?