What is the proper way to handle supabase directory being a few paths deep into my project?

Recently changed my repo into a monorepo with nx. The schema we want to have is supabase lives in ./libs/db/supabase. I tried running commands like supabase start --workdir ./libs/db/supabase from the command line, but it never seemed to apply my migrations properly. Only when I first cd into ./libs/db then run supabase start. If I want some of my common supabase commands to be npm scripts, do I just have the script cd into that directory, run the command, then cd back out? Im thinking there has to be a better way to do this?
1 Reply
ihm40
ihm40•2mo ago
First check your files into git to avoid losing them but what happens if you run supabase init --workdir ./libs/db/ next to libs. Does that let you then run supabase commands at the libs and db level?

Did you find this page helpful?