Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Loading module from “h/hello-astro/_astro/hoisted.d643c4ae.js” was blocked because of a disallowed MIME type (“text/html”)" #20

Open
dandv opened this issue Aug 9, 2023 · 4 comments

Comments

@dandv
Copy link

dandv commented Aug 9, 2023

Got this on my first build. I suspect there's an nginx setting I need to tweak?

@dandv dandv changed the title "was blocked because of a disallowed MIME type (“text/html”)" "Loading module from “h/hello-astro/_astro/hoisted.d643c4ae.js” was blocked because of a disallowed MIME type (“text/html”)" Aug 9, 2023
@ChristineTham
Copy link
Collaborator

Hello thanks for your feedback.

I can't seem to replicate this issue. Perhaps it is related to nginx as you suggest.

The other option is you can try upgrading to the latest version of packages:

pnpm up -L

and then rebuild and see what happens.

@g-suraj
Copy link

g-suraj commented Mar 3, 2024

Did you ever manage to solve this? I'm running into something similar

@g-suraj
Copy link

g-suraj commented Mar 3, 2024

I've managed to figure out what the issue is If you're using github pages. It won't serve assets from folders that begin with _. As such you'll have to override the config with another name.

@HarryAdney
Copy link

HarryAdney commented May 20, 2024

I had the same problem and the page rendered without any css at all. It turns out the links in the built html files just needed to be changed from ="/_astro to ="./_astro

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants