App reviews, troubleshooting, and recommendations
I've created an app and now want to deploy it, but I can't.
Steps I take to start the production server:
npm run build
cd ./web
npm run serve
It serves the app, but when I open it in the admin, this message appears:
"Your app is running without the SHOPIFY_API_KEY environment variable. Please ensure that it is set when running or building your React app."
I definitely have that environment variable in .env file in the web folder.
What can I do ?
Hello @seymurcrisp
Can you please elaborate on which server your App is hosted on?
And which Shopify template you are using?
Could you please clarify for me so that I can provide you with the solution?
Thanks. I later realized it was because dotenv wasn't configured properly, so the script couldn't read environment variables.
Can you tell me how you configured your dotenv properly? It's very helpful to me.
Yeah, so there needs to be two env files, one in web folder, one in frontend folder. And SHOPIFY_API_KEY variable needs to be in both of those files. But when deploying to a real server this probably won't be needed
On our Shopify Expert Marketplace, you can find many trusted third party developers and fr...
By Arno Nov 27, 2023You've downloaded the Search & Discovery app from the Shopify App store, and as you're ...
By Skye Nov 8, 2023The year-end shopping season is just around the corner. Is a flash sale on your radar? Are...
By Jasonh Nov 6, 2023