Shopify CLI php app deploy instance MIME error.

Topic summary

Main issue: After deploying a Shopify app on an AWS EC2 instance, the app installs on the store but the in-app interface fails to load. The browser console reports: “Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of ‘text/html’. Strict MIME type checking is enforced for module scripts per HTML spec.”

Context: The author says they made “necessary changes” in the code but the error persists. No configuration details, code snippets, or server headers are provided.

Latest update: A second participant asks if a solution was found and reports encountering the same error.

Status: Unresolved. No confirmed fix or root cause identified in the thread.

Key open question: Why the deployed instance is serving a module script with a “text/html” MIME type instead of a JavaScript module content type, preventing the app interface from loading.

Summarized with AI on January 4. AI used: gpt-5.

I have successfully created build and deploy on the EC2 instance.

app is installed successfully on the store but i am getting error to access the app interface. I am getting below MIME error in the console

Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of “text/html”. Strict MIME type checking is enforced for module scripts per HTML spec.

I have tried with necessary changes in the code but not working

Could you please help what is the issue. I have spent lot of time on it to resolve but not getting any solution.

were you able to solve this issue? i’m having the same error