Please anyone help me:
Do you use Vite? If so, then the name of your environment variables need to start with
@PeppeL-G Thanks for replying. But I am not using the Vite.
@Merieli Thanks for replying. But I have already completed this
Glad you got this resolved for you!
But using environment variables outside the .env file is incorrect, what you did was create a variable with capital letter. I advise you to research to better understand the purpose of an environment variable.
I haven’t used Vite yet, this is how I go about it using Vue CLI. Create a ‘.env.local’ file and save your environmental variables there. Make sure you add that to .gitignore so that you don’t push it to a remote repo. Depending on the platform you are hosting your frontend you can set the environment variables in the deployment settings. I’ve done that with Netlify and Heroku.