Cancel
Showing results for 
Search instead for 
Did you mean: 

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

Valued Contributor
Valued Contributor

I have a problem with my React Node app (set up using create-react-app). I saw similar thread here and it also wasn't resolved.

I'm getting this error:

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

Looks like my manifest.json file is not getting read somehow, despite being physically in place since I can reach it via url - myApplication/manifest.json. The same story goes with favicon - it's the default green leaf. 

 

Referenced in index.html:

<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico" />

 

manifest.json:

{
  "short_name": "App",
  "name": "App",
  "icons": [
    {
      "src": "favicon.ico",
      "sizes": "64x64 32x32 24x24 16x16",
      "type": "image/x-icon"
    }
  ],
  "start_url": ".",
  "display": "standalone",
  "theme_color": "#000000",
  "background_color": "#ffffff"
}

 

Everything works locally, obviously.

Does anyone know how to solve it?

 

1 REPLY 1

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

Valued Contributor
Valued Contributor

I managed to solve it. 

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

Had to use crossorigin parameter.