Forums

static .mjs file served with wrong MIME Type of ""

I have a problem with my django application.

It does not serve the static files correctly. All files are served and the CSS works but for the.mjs files i get a "Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of ""." error.

Apparently django does not set the MIME Type correctly but i can't figure out why. And it had worked before so i know it should work.

Maybe someone knows what i did wrong and can help me fix it.

We can include that in our new system image, which we are hopefully going to release soon.

Hi glenn,

thank you for your answer. I still have questions. How does a new system image fix my problems? What do you mean with new system image? Is there some sort of changelog for pythonanywhere so i can follow the development and know when you release the new system image?

Thank you and best regards

The new system image will have the the mimetype mapping for .mjs. The system image is the underlying OS and installed modules that your account is based on. We do not have a public changelog.

Ok i don't know with system image you mean the OS.

I tried updating from fishnchips to glastonbury and this already solved my problem, so it seems that the glastonbury image already has the correct mapping for mjs.

Thank you very much for the help.

Ah! I hadn't realised that that was already there. Thanks for letting us know.