'Javascript Modules not working on some clients

I recently started using Javascript modules in my websites, and everything was fine when developing on my desktop. I went to do work on my laptop, but for some reason JS is throwing the following error:

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.

Both of my machines are on the latest version of Windows 10 and Brave browser. Google doesn't have anything, and I am out of ideas. My best guess is some weird browser version issue, but I cant find anything about it.



Solution 1:[1]

Answer:
This is an issue with the http server I was using. My version of Python's http server on my laptop doesnt support modules. this post fixed my issue.

Also why do I have to wait 2 days to mark this as an answer?

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 prushton