1

I'm getting the following error with my manifest.json:

Manifest: Line: 1, column: 1, Unexpected token.

I've confirmed my manifest.json is valid and is encoded in UTF-8. Can anyone give me any tips on what might be causing this issue?

Nic Stelter
  • 641
  • 2
  • 7
  • 19
  • Well, please provide some context, i have no idea exactly where you want to use it. Jyst in case you want to use it inside a pwa, i once ha that error too, and it was because my server didnt actually server the right file. Try manually typing the path to it in the browser to see of you get it – Matei Adriel Feb 10 '19 at 22:16
  • I setup a route in express to serve the manifest.json file...still no dice – Nic Stelter Feb 21 '19 at 11:12
  • First, sorry for the typos, sceond, can you send me the full code of the route? – Matei Adriel Feb 21 '19 at 11:18
  • Maybe you should add web.config file to your build folder here https://stackoverflow.com/questions/12378712/loading-json-files-generates-404-errors – Olexandr Popovych Apr 06 '19 at 21:43

2 Answers2

1

Is this an Angular project? And are you trying to host this on Azure? I had the same error, i posted my fix here:

Angular 6 application : Manifest: Line: 1, column: 1, Unexpected token

If this is not related to Azure, but it is an Angular project, check your angular.json/angular-cli.json and add manifest.json to "assets" as described by Honzik in this answer:

https://stackoverflow.com/a/51553047/7335211

Turbolego
  • 9
  • 1
  • 7
0

Maybe you forgot to put a comma ","
Valid example:

{
   "manifest_version": 2, <<comma
   "version": "1.0", <<comma
   "name": "my extension name" <<no comma
}

Invalid example:

{
   "manifest_version": 2 << no comma
   "version": "1.0" <<no comma
   "name": "my extension name" <<no comma
}

Or you only forgot to put ", or ":"

ouflak
  • 2,458
  • 10
  • 44
  • 49
Angelo
  • 9
  • 3