admin管理员组文章数量:1401798
I get the following error when using the Google Lighthouse extension or other similar manifest.json validation services.
"ERROR: file isn't valid JSON: SyntaxError: Unexpected token in JSON at position 0"
The manifest works. I get the "Add to homescreen" prompt and the manifest.json file is found in dev tools (Application / Manifest section) though the parameters of the file aren't shown.
I've checked the format against the Google IO and that the MIME type is correct. I'm lost as to what else to try.
Any ideas?
I get the following error when using the Google Lighthouse extension or other similar manifest.json validation services.
"ERROR: file isn't valid JSON: SyntaxError: Unexpected token in JSON at position 0"
The manifest works. I get the "Add to homescreen" prompt and the manifest.json file is found in dev tools (Application / Manifest section) though the parameters of the file aren't shown.
I've checked the format against the Google IO and that the MIME type is correct. I'm lost as to what else to try.
Any ideas?
Share Improve this question edited Aug 23, 2019 at 11:07 toepoke.co.uk asked Feb 12, 2017 at 11:28 toepoke.co.uktoepoke.co.uk 8271 gold badge7 silver badges19 bronze badges1 Answer
Reset to default 12If you're on Windows the above error may be because you have the manifest.json file saved with a Byte Order Mark (BOM).
Saving without a BOM may fix the problem.
In Visual Studio use Save As, use the dropdown next to Save to select Save with Encoding, then pick Unicode (UTF-8 without signature).
本文标签: javascriptInvalid JSON syntax in progressive web app manifestjson fileStack Overflow
版权声明:本文标题:javascript - Invalid JSON syntax in progressive web app manifest.json file - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744330698a2600949.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论