New Shopify Certification now available: Liquid Storefronts for Theme Developers

npm run build gives 404

Shopify Partner
5 0 2



I have created a new app using the Shopify App Template for PHP (


When I run

npm run dev

the app works fine in my local development environment.


However, when I try to deploy the app to a server and run

npm run build --api-key=MY_API_KEY

I encounter the following error:


"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."


To resolve this issue, I tried running the build command with the environment variable set as follows:


This successfully addressed the API key error.


However, now when I attempt to install my app on a development store, the installation flow redirects to the React page I built, but then redirects back to Shopify with a 404 error. It seems that the authentication, app installation, and recurring charge steps are being missed.


Can you please help what am I missing?


Thank you.

Replies 0 (0)