evan-buss / openbooks

Search and Download eBooks
https://evan-buss.github.io/openbooks/
MIT License
1.79k stars 59 forks source link

Expected a JavaScript module script but the server responded with a MIME type of "text/plain". #47

Closed tengfong00 closed 2 years ago

tengfong00 commented 2 years ago

The command I use it just normal openbooks server image image

This is what the browser devtools console error came out with a blank white screen. image

evan-buss commented 2 years ago

I encountered this issue on Windows 11. Are you using Windows by chance? I see this issue in the Go repository. It seems this is caused by incorrect configuration in the Windows Registry. Some applications (such as Visual Studio) modify the registry. See Stack Overflow.

I was able to fix this on my machine by modifying the registry seen below.

Before: image

After: image

After updating the "Content Type" entry, the web page loads properly.