Too long environment variable
As per the docs:
You can add up to 100 environment variables. Environment variable names cannot be more than 40 characters long, and they must start with a letter and only contain letters numbers, and underscores. Environment variable values cannot be larger than 8KB.
I use (and need) process.env.NEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URL
in my project. Unfortunately, it exceeds the limit of characters by 1, at 41... Any way to work around it? Maybe increase a little bit the limit? The variable is set automatically by Vercel, so I can't shorten it.3 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!
This isn't directly addressing the length issue, but Vercel can't set your Convex environment variables. Are you using this value in a Convex function?
Yes I'm using it in a convex function. Yet as Convex functions run on the server, I actually didn't need the
NEXT_PUBLIC
part of the env name, which makes it available to the client-side. So my problem is solved. But I still think it'd be great to increase the max length a little bit. 40 characters should be enough for most use cases but you never know what your users might require at some point. And I don't think it would cause much overhead to increase the limit to something like 64.