MIME type error

Hi, I’m trying to upload my portfolio via Hostinger, but after deploying it I got this error message in my console:
Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of “text/plain”. Strict MIME type checking is enforced for module scripts per HTML spec.
I tried changing my script type from “module” to “text/javascript” as suggested on one of the forums, but then I got this error message:
Uncaught SyntaxError: Cannot use import statement outside a module
Does anyone know how to fix this?
p.s. I’m using react+vite and the error is in main.jsx line 1, as stated in the message, which is a simple react import which I double checked multiple times.