npx convex dev doesnt download generated code from another repo
i have 2 separate repo that i plan use to share convex backend. One is working fine, the new one (expo project), even after successfully running
npx convex dev
doesnt seems to load the functions correctly.11 Replies
i figured out something. it seems like running
npx convex dev
overrides the existing functions and schema created on the my main repo.
i then run the same command on the main repo, and it regenerates the function (seen on convex dashboard).
but the PROBLEM is, the 2nd repo doesnt receive the changes automatically and i need to run the command again on 2nd repo. and running it clears everything all over againplease help
There should be a single source of truth for your convex functions, so one convex/ folder in one repo. If you want to call the convex functions from a different repo, you can use https://stack.convex.dev/multiple-repos
Convex in Multiple Repositories
Turns out, you can organize your Convex project across multiple repositories! Check out this guide on how to implement this in your project.
hey @Lee thanks for sharing this, trying this out right now
okay it works! so i just need to keep runnning the CLI to update the generated api file
but there's a problem, the generated data type returns any
all of them returns any
so im not getting total typesafety on the other repo
oh i see this now
so far so good then
@Lee i do have a quick follow up question, i will try it myself later on, but will this work with convex auth ?
Yes it should work. If you see problems, let us know
Hey @lee ive tested it
And it works
Thank you !!