清单不是有效的 JSON.行:1,列:1,意外标记 [英] Manifest is not valid JSON. Line: 1, column: 1, Unexpected token

查看:20
本文介绍了清单不是有效的 JSON.行:1,列:1,意外标记的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

不断收到此错误:清单不是有效的 JSON.行:1,列:1,意外标记."我不明白我的代码有什么问题?这是我到目前为止所拥有的:

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 far:

{
    "manifest_version": 2,
    "name": "extension",
    "version": "1.0",
    "description": "My first Chrome extension.",
    "browser_action": {
        "default_icon": "icon.jpg",
        "popup": "popup.html"
    }
}

推荐答案

我添加了 crossorigin 属性.

I added crossorigin attribute its worked.

<link rel="manifest" crossorigin="use-credentials" href="%PUBLIC_URL%/manifest.json" />

这篇关于清单不是有效的 JSON.行:1,列:1,意外标记的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆