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

前端 未结 10 1332
小鲜肉
小鲜肉 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:36

    I had my manifest.json File Properties set with Build Action: None, in Visual Studio 2010.

    Changing, in Visual Studio, to Content ensured the file was transferred when I deployed.

    Maybe yours is a similar issue.

    Edit

    Given my downvote I thought I should expand and say that my point was that, given that at line 1, column 1 there is valid json, it is more likely that you are getting a 404 http response than the actual json file returned.

    So maybe the file isn't in the correct place or the server doesn't have permissions or whatever but the above is what had gone wrong with mine. Admittedly it is maybe too specific to what had gone wrong with mine and not definitely what was wrong with yours.

    But the general point still stands, it's more likely caused by web server returning an http response for the json file, check the response in the network log in your browser.

提交回复
热议问题