MIME type error with React template

I'm using the React + Caddy template by @Brody for my React app and am getting the following error in the browser 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.
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.
The situation is a little weird because my organization wants this React app to appear on their Wordpress page, so I've been using an iframe to display it. This strategy has been working fine until my most recent deployment. I have no idea what I could have changed in my last commit to cause this problem, because I haven't touched any "core" files, like index.html, caddyfile, etc. I have never seen this type of error and honestly don't know where to start with troubleshooting it. It does seem to be related to the files coming from the server, though, so I figured it would be a good idea to ask here. I appreciate any help you can give.
Solution:
yep i cant seem to reproduce, maybe bad cache?
Jump to solution
11 Replies
Percy
Percy10mo ago
Project ID: 4d538bd3-aeab-4706-b060-8f714a366c38
Jedi_Mediator
Jedi_Mediator10mo ago
4d538bd3-aeab-4706-b060-8f714a366c38
Brody
Brody10mo ago
happy to help but i would need to be able to see this error for myself, where can i go so that i get the same error?
Jedi_Mediator
Jedi_Mediator10mo ago
It's unclear to me whether you'll actually get the error. It appears in a normal browser window regardless of whether I'm logged in as a Wordpress admin, but in an incognito window, it doesn't appear.
Jedi_Mediator
Jedi_Mediator10mo ago
Regardless, here's a link to the page. If you click on the "filters" button, a modal will appear containing the iframe that seems to be causing the issue. https://www.imagepointe.com/design-library-new-designs/?designtype=screen%20print&pageNumber=1&featured=true
Jedi_Mediator
Jedi_Mediator10mo ago
It seems to work fine on mobile too. Very strange.
Solution
Brody
Brody10mo ago
yep i cant seem to reproduce, maybe bad cache?
Jedi_Mediator
Jedi_Mediator10mo ago
for my browser? or the site?
Brody
Brody10mo ago
browser
Jedi_Mediator
Jedi_Mediator10mo ago
Well clearing browser cache does seem to have worked for now. Thanks for always being helpful!
Brody
Brody10mo ago
no problem!
Want results from more Discord servers?
Add your server