NODE_ENV always production
So I seem to be having the opposite problem to the rest of the people on here, in that my NODE_ENV variable is always set to "production" on my convex development branch, even when I explicitly set NODE_ENV to "development". I can work around it but it seems a bit odd.
4 Replies
Thanks for posting in <#1088161997662724167>.
Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets.
- Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.)
- Use search.convex.dev to search Docs, Stack, and Discord all at once.
- Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI.
- Avoid tagging staff unless specifically instructed.
Thank you!
NODE_ENV used to be "development" everywhere, in a recent change it was switched "production" everywhere. The reason it can't be overridden is eslint controls it based on whether the build output is set to be minified or not, which is controlled from the Convex platform side.
There's work ongoing to get it to "development" in dev and "production" in preview/production, nothing for sure yet though.
Is there a best strategy for identifying when you're running from the dev instance of convex vs the prod instance?
Make your own env var, eg., CONVEX_ENV