You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My problem is the following:
When I deploy from github, my CapRover application runs successfully, but I cannot display the environment variable value entered by the Caprover interface. The app shows a value "undefined"
You're reading your variable in your frontend code. The env vars aren't available in frontend. They are available ONLY during runtime. I'm not familiar with ViteJS - but if I were to guess it probably needs the env var on build time:
ARG VITE_HELLO_WORLD: Defines a build argument for the environment variable "VITE_HELLO_WORLD". This argument can be provided during the build process.
ENV VITE_HELLO_WORLD $VITE_HELLO_WORLD: Sets the environment variable "VITE_HELLO_WORLD" to the value of the build argument. This allows the environment variable to be customized during container build, for example, when using CapRover.
My problem is the following:
When I deploy from github, my CapRover application runs successfully, but I cannot display the environment variable value entered by the Caprover interface. The app shows a value "undefined"
my
captain-definition
file:my
App.jsx
file:my
vite.config.js
file:The text was updated successfully, but these errors were encountered: