Type generation error
Hello!
I'm trying to generate types for one of my projects via CLI but it throws error:
It works for my other project though.
Any help?
Thank you!
7 Replies
Did you disable your Data API by any chance?
Go here and check if it's disabled https://supabase.com/dashboard/project/_/settings/api
To me it seems like he hasnt even configured the project id in config.toml
It says <my_project_id> in the error
Maybe the user omitted that from the message when they posted it.
Ohh I am stupid haha. Thought he just had that in his config haha
Okay, I found it.
I was trying to harden my setup and followed the suggestion on this github post (https://github.com/orgs/supabase/discussions/12439)
this of course affected the type generation.
thank you @silentworks for your insight!
GitHub
Can my database schema and views viewed by anyone? · supabase · D...
Hello guys, we are using Supabase in a NextJS application and we are very happy with it. All our tables are stored in the (default) public schema. For our server side code we initialize a client th...
Nah it was a good thing to point out when trying to help someone as sometimes folks do mess with this and it causes issues.
Yeah without the Data API there is no way to get the type generation with the CLI.
Maybe it depends on what your function is returning. This is how I define it and it has never affected type generation for me: