问题
First I have scoured the platform and google with no luck.
Getting a random Manifest error when I push to production. With one push everything is fine. With another, the error appears. And when it errors all the icon links break. I can't figure this out at all. Any help is appreciated.
Served from https://zeit.com
live app: https://ryancarville.com
repo: https://github.com/ryancarville/portfolio-app
manifest code
{
"short_name": "Full-Stack-Portfolio",
"name": "Ryan-Carville-Full-Stack-Portfolio",
"icons": [
{
"src": "favicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
},
{
"src": "/images/bequia-logo.png",
"type": "image/png",
"sizes": "204x156"
},
{
"src": "/images/camera.png",
"type": "image/png",
"sizes": "340x340"
},
{
"src": "/images/headphones.png",
"type": "image/png",
"sizes": "512x512"
},
{
"src": "/images/food.png",
"type": "image/png",
"sizes": "512x512"
},
{
"src": "/images/portrait.png",
"type": "image/png",
"sizes": "512x512"
},
{
"src": "/images/products.png",
"type": "image/png",
"sizes": "512x512"
},
{
"src": "/images/not-found.jpg",
"type": "image/jpg",
"sizes": "818x718"
}
],
"start_url": ".",
"display": "standalone",
"theme_color": "#ffffff",
"background_color": "#ffffff"
}
回答1:
your manifast.json file looks good. the problem is with your server. when the browser is requesting for manifast.json file 404 page is served as response. That is why syntax error.
来源:https://stackoverflow.com/questions/59187004/manifest-line-1-column-1-syntax-error-when-pushed-to-production