Deploying Client Side Env Variables/Incorrect Useage?

I had client side env variables successfully running in production for a few days before they seemingly "turned off" (are undefined) - I didn't change anything (that I know of)
This is how I use the variables
  function isRunningLocally() {
    return window.location.hostname === 'localhost';
  }
  if (!isRunningLocally()) {
    // this isn't running
    posthog.init(import.meta.env.REACT_APP_PUBLIC_POSTHOG_KEY!, {
      api_host: import.meta.env.REACT_APP_PUBLIC_POSTHOG_HOST,
      person_profiles: 'always',
    });
  }

I set them via the REACT_APP_ANOTHER_VAR=somevalue wasp deploy fly deploy syntax as mentioned in the docs here - https://wasp-lang.dev/docs/advanced/deployment/cli#environment-variables-1

Is there anything I might have done wrong here?
Wasp CLI can deploy your full-stack application with only a single command.
Was this page helpful?