hello-astro icon indicating copy to clipboard operation
hello-astro copied to clipboard

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

Open dandv opened this issue 1 year ago • 4 comments

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

dandv avatar Aug 09 '23 18:08 dandv

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.

ChristineTham avatar Aug 15 '23 22:08 ChristineTham

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

g-suraj avatar Mar 03 '24 03:03 g-suraj

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.

g-suraj avatar Mar 03 '24 11:03 g-suraj

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

HarryAdney avatar May 20 '24 10:05 HarryAdney