Ck
Ck9mo ago

Use personal dev deployment instead of other team members.

Hi, I have been looking through the existing posts, but cannot find the exact answer to my question. My partner in a react native project I am working on setup convex, and I pulled it down from the repo. It is functionally working, however it is sending to his dev deployment and not mine. When using the CLI I can import data to my dev deployment, however I cannot when using the code. Below I have our .env.local (with relevant data removed), let me know if there is anything else I should be changing as I am quite confused as to why it would be sending to his. Thanks in advance!
CONVEX_DEPLOYMENT= //dev: //my personal one (i think? its different to his.)

EXPO_PUBLIC_CONVEX_URL= //common/shared url
EXPO_PUBLIC_CONVEX_SITE= //common/shared url

CONVEX_URL= //common/shared url
CONVEX_DEPLOYMENT= //dev: //my personal one (i think? its different to his.)

EXPO_PUBLIC_CONVEX_URL= //common/shared url
EXPO_PUBLIC_CONVEX_SITE= //common/shared url

CONVEX_URL= //common/shared url
3 Replies
lee
lee9mo ago
CONVEX_DEPLOYMENT is the deployment that is pushed to with npx convex dev and npx convex import (etc). meanwhile EXPO_PUBLIC_CONVEX_URL is the url that the client app connects to. so it should be different for each developer. here's one of my .env.local files
NEXT_PUBLIC_CONVEX_URL="https://childlike-goldfinch-410.convex.cloud"

# Deployment used by `npx convex dev`
CONVEX_DEPLOYMENT=dev:childlike-goldfinch-410 # team: convex, project: convex-chess-4f031
NEXT_PUBLIC_CONVEX_URL="https://childlike-goldfinch-410.convex.cloud"

# Deployment used by `npx convex dev`
CONVEX_DEPLOYMENT=dev:childlike-goldfinch-410 # team: convex, project: convex-chess-4f031
see how childlike-goldfinch-410 appears in both places (replace NEXT_ with EXPO_ for your usage)
Michal Srb
Michal Srb9mo ago
Delete the .env.local file and run npx convex dev, then adjust the new file as needed.
Ck
CkOP9mo ago
Perfect thanks a ton!

Did you find this page helpful?