Manifest is not valid JSON. Line: 1, column: 1, Unexpected token

前端 未结 10 1331
小鲜肉
小鲜肉 2020-12-09 08:31

keep getting this error: \"Manifest is not valid JSON. Line: 1, column: 1, Unexpected token.\" i don\'t understand what the issue is with my code? here is what i have so f

10条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-09 08:41

    Content-type

    Check the Content-Type of manifest.json in the Network tab. This needs to be application/json instead of text/html.

    If you have wrong content-type, you may need to configure the settings of your webserver to correctly serve json files.

    In my case I had to add it to the nginx sites-enabled file:

    location ~* .(jpg|jpeg|gif|png|css|js|ico|xml|svg|json)$

提交回复
热议问题