Getting error "Loading module from scores.js” was blocked because of a disallowed MIME type (“text/html”)

PLEASE help us help you by writing a good post!
Hi,
I am deploying my site https://weschessleague.netlify.app. When I try to go to the /scores.html page the javascript file gets blocked with the error message “Loading module from “https://weschessleague.netlify.app/scores.js” was blocked because of a disallowed MIME type (“text/html”).” I am importing the js file in my scores.html file as :
<script type="module" src="/scores.js"></script>

Does anyone have a remedy for this so I can import my javascript file ok and render page.

Thanks Alan

  • we need to know your netlify site name. Example: gifted-antelope-58b104.netlify.app
  • DNS issues? Tell us the custom domain, tell us the error message! We can’t help if we don’t know your domain.
  • Build problems? Link or paste the FULL build log & build settings screenshot

The better the post - the faster the answer.

I don’t see any such issue.

/scores.js loads with 200 OK status.

Yes. What I did was move scores.js into the /Public directory were I had the scores.html file located. Thanks.

1 Like