Chrome reports a syntax error at line 1, column 1 for manifest.json
Manifest: Line: 1, column: 1, Syntax error.Short answer
Chrome reads the manifest as JSON. A syntax error at line 1, column 1 almost always means the URL returned something else, usually your index.html, because the file is missing, the path is wrong or a catch-all route answers first. Fetch the manifest URL with curl and fix whatever serves it.
Fix it fast
1Find out which cause you have
Request the exact manifest URL from the link tag and look at what comes back. If the body starts with <!doctype html>, the browser is parsing a web page as JSON.
curl -s -D - https://example.com/manifest.json | head -152Match what you see, then jump to its fix
- 1
The curl response is your index.html, or only breaks on nested routesThe path in the link tag does not point at the fileFix - 2
The status is 200 but the body is HTMLA catch-all rewrite answers for the missing fileFix - 3
The response is your login page, or 401/403, when you request it without cookiesThe manifest is behind a login and the request sends no credentialsFix
- 1
What does the error look like?
Manifest: Line: 1, column: 1, Syntax error.
Cause 1 of 3
The path in the link tag does not point at the file
1Check
A relative href such as manifest.json resolves against the current URL, so it points at a different place on /app/orders than on /. With Vite, a file that is not in public/ is not served at the site root.
grep -n "rel=\"manifest\"" index.html
ls public/manifest.json2Fix
Put the file in public/ and link it with a root-absolute path.
<link rel="manifest" href="/manifest.json" />3Verify
Request the URL again; the body is JSON.
curl -s https://example.com/manifest.json | head -5Confirmed by vite.dev
Cause 2 of 3
A catch-all rewrite answers for the missing file
1Check
A single-page-app rule that sends every path to index.html also answers for a manifest path that has no file. A rewrite does not override a URL that matches a real file, so adding the file to the publish folder fixes this.
curl -s -o /dev/null -w "%{http_code} %{content_type}\n" https://example.com/manifest.json2Fix
Make sure the manifest is part of the deployed output, in the folder Netlify publishes.
npm run build
ls dist/manifest.json3Verify
After deploy, the content type is JSON rather than text/html.
curl -s -o /dev/null -w "%{http_code} %{content_type}\n" https://example.com/manifest.jsonConfirmed by docs.netlify.com
Cause 3 of 3
The manifest is behind a login and the request sends no credentials
1Check
A manifest request is made without credentials unless the link tag says otherwise. If the server wants a cookie, it answers with a login page.
curl -s -o /dev/null -w "%{http_code}\n" https://example.com/manifest.json2Fix
Serve the manifest without authentication, or add crossorigin="use-credentials" to the link tag when it must be protected.
<link rel="manifest" href="/manifest.json" crossorigin="use-credentials" />3Verify
Reload the page with DevTools open; the manifest error is gone.
// DevTools > Application > ManifestConfirmed by developer.mozilla.org
How do I stop it coming back?
- Use root-absolute paths for the manifest and its icons.
- Add a build step that checks dist/manifest.json exists and parses as JSON.
- Serve the file as application/manifest+json when you use the .webmanifest extension.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.
Which stack is behind this page?
Projects of mine built on the same technologies:
- TaxiDexMy own multi-tenant taxi dispatch SaaS: API, dispatcher portal, driver and passenger apps, and the servers underneath.
- QistLockA NestJS and React SaaS driving an Android Device Owner agent that locks financed phones when payments lapse.
- TaskvareA task and project-management suite: React on the web, Flutter on mobile, TypeScript underneath.
Related fixes
Web apps
A React app on Netlify shows 404 when you reload a route
Opening /about from a link works; pressing refresh or pasting the URL gives 404
Netlify looks for a real file at the URL you reload, finds none for a client-side route like /dashboard, and returns 404.
3 causes, each with a fixWeb apps
Module not found for antd/dist/antd.less after upgrading to Ant Design 5
Module not found: Error: Can't resolve 'antd/dist/antd.less'
Ant Design 5 dropped Less and the bundled CSS file for CSS-in-JS, so antd/dist/antd.less no longer exists.
3 causes, each with a fixWeb apps
Astro Code component fails inside a React component
Astro components cannot be rendered directly via function call
Astro components such as Code only exist on the server and render static HTML.
2 causes, each with a fixWeb apps
React shows Attempted import error when importing a component or function
Attempted import error:
The build found the file but not the name you asked for.
2 causes, each with a fixWeb apps
How to catch and handle a 422 from Axios in a Redux thunk
action.error.message is 'Rejected' and action.payload is undefined
A 422 means the server read the request but cannot process its content, so repeating it unchanged fails again.
4 causes, each with a fixWeb apps
axios gets 429 Too Many Requests from a React app
429 (Too Many Requests)
A 429 comes from the server or an API gateway, not from axios: your client sent too many requests in a window.
4 causes, each with a fix