djbalinD
Convex Community16mo ago
3 replies
djbalin

Control Convex env variables output location

Hi, yarn convex dev seems to forcibly create env.local even though we have an .env file that we want to use instead.
We are in an Expo React Native app where we cannot reliably use env.local, instead we would ideally use env.development and env.production, but .env can suffice (env.local can not, however).

The docs https://docs.convex.dev/production/project-configuration#convexjson state that "npx convex dev writes the URL to the .env.local or .env file.", but we can only get it to write to .env.local.

We tried:
- Delete env.local and run convex dev: this prompts us to set up our project and populates env.local
- Paste contents from env.local into env and delete env.local
- Run convex dev again - does NOT prompt to set up project (so it recognizes env?) but DOES automatically populate env.local again (see screenshot)


Thanks!
image.png
Was this page helpful?