Re: Shopify App - Failed To Load Module Script: Expected JS Module But Server Responded With "T

Solved

Shopify App - Failed To Load Module Script: Expected JS Module But Server Responded With "Text/Jsx"

sajan8093
Shopify Partner
2 0 0

I have created a Shopify public application using the Shopify CLI and got a complete source code in react and node, and after installing the application in the Shopify store I'm getting the below errors.

 

(1) Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/jsx". Strict MIME type checking is enforced for module scripts per HTML spec.

(2) Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('<URL>') does not match the recipient window's origin ('<URL>').

 

The source code I have got using the CLI is configured with React and vite and it's using the .jsx extension but Shopify admin doesn't allow the .jsx extension and my application view is not showing in the Shopify store after installing the application.

Can anyone assist here to resolve the above issues?

Accepted Solution (1)

Jarrad78
Shopify Partner
3 1 3

This is an accepted solution.

Helllo @sajan8093, were you able to resolve this issue? If so can you provide any guidance on how you were able to solve it? These Shopify forums are almost worthless since there's never any helpful answers associated with the questions that are asked.

View solution in original post

Reply 1 (1)

Jarrad78
Shopify Partner
3 1 3

This is an accepted solution.

Helllo @sajan8093, were you able to resolve this issue? If so can you provide any guidance on how you were able to solve it? These Shopify forums are almost worthless since there's never any helpful answers associated with the questions that are asked.