Ad

400 Errors On Github Pages Because Of Error On Manifest.json Being Read As Text/html

- 1 answer

So I'm trying to serve my github pages website to https://dgatto.github.io/website/ and i keep getting these errors

Failed to load resource: the server responded with a status of 400 ()
manifest.json:1 Failed to load resource: the server responded with a status of 400 ()
manifest.json:1 Manifest: Line: 1, column: 1, Syntax error.

I think that the 400's are because of the "syntax error" and I'm pretty sure that the syntax error is because of the manifest.json file being read as text/html in the network tab.

My question is, how do I change the server to accept the file as json? It's github pages so I don't really have access to the server itself.

Here's the repo if that helps: https://github.com/dgatto/website

Ad

Answer

Since you are serving your Application at https://dgatto.github.io/website/, you should define it as the homepage in your package.json file and then build.

Ad
source: stackoverflow.com
Ad