I just deployed an Angular 8 project to my Github repository but nothing gets displayed on the Github page but I see an error on the browser console.
On Firefox the error says:
Loading module from “https://theotherspace.illiteratibooksandcoffee.com/theotherspace/runtime-es2015.27965c48d77c449cb93c.js” was blocked because of a disallowed MIME type (“text/html”).
and on Chrome:
Failed to load resource: the server responded with a status of 404 ()
Below are the screenshots:
I had the similar issue as I was using Github pages from a different repository (than the parent github.io repo).
By changing the base href
to the current directory solved the issue.
Earlier
<base href="/">
Change to
<base href="./">
I referred to https://github.com/angular/angular/issues/30835 until I arrived at this solution.
I was working on a nextjs + typescript project and had the exactly same problem.
I solved it by adding an empty .nojekyll file
to the target folder (same as github pages deployment settings).
I've been searching for days until I arrived at this solution. Hope it will help someone who is also in trouble.
The source I found was in Japanese, but this English one has more details. https://til.simonwillison.net/github/github-pages
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With