I am defining the SHOPIFY_BASE_URL variable for API endpoints, but it is coming as undefined when I try to use it in my web/frontend folder, is there any specific format w.r.t. to defining and using env variables in the Shopify React app template.
I am defining the endpoints constant inside a new folder web/api/frontend/api/constants.js but when I'm trying to import them and use them I'm facing an issue in my app, it throws the following error in the console.
I'm trying to install npm packages for React inside the web/frontend/ folder but it is corrupting my node modules and throwing random errors, clean re-install of node modules also doesn't fix it, I have to replace the node modules from a backup of the same Shopify app I have as a .zip file.
How can I work to resolve these issues, is there any guidelines/best practices or some tutorial (couldn't find much regarding these issues in shopify.dev)