Hi all,
Incredibly frustrating, i’m following the Shopify docs for deploying an app to Heroku for an app which was scaffolded and build with the Shopify CLI.
I’m following these docs:
https://shopify.dev/docs/apps/launch/deployment/deploy-web-app/deploy-to-heroku
And more generally for deploying to a hosting service:
https://shopify.dev/docs/apps/launch/deployment/deploy-web-app/deploy-to-hosting-service
Initially the app would just crash immediately and a Heroku error would display. After reading other people’s issues with this, it turned out to be that the docs don’t actually tell you to set up a HOST env variable on Heroku. Literally no mention of the HOST env variable whatsoever in the docs, so I added it via Heroku web admin, and suddenly the app no longer crashes! Hurray!
However, the current issue I have is that I now see a Shopify error as follows:
Additionally the logs show the following:
remote: Building the frontend app without an API key. The frontend build will not run without an API key. Set the SHOPIFY_API_KEY environment variable when running the build command.
I’ve followed the docs completely I just don’t understand what to do at this point. How do I “Set the SHOPIFY_API_KEY environment variable when running the build command” when this is all supposed to be handled by the CLI’s that are being used according to the docs?
Note: calling “shopify app env show” returns the expected environment variables and values.
Thanks for any advice
Mat