12

I have a react application that works fine locally. However after I deploy to Azure Web App I get following error in console:

https://xxx.azurewebsites.net/manifest.json 404 (Not Found)

I can see the purpose is when people install the app on a mobile, then REACT renders differently dependent on the devise. I can also see it is located in the index.html file:

<link rel="manifest" href="%PUBLIC_URL%/manifest.json" /> 

As my app is a web site does this file has any effect? Can I just delete it or should I try to solve the error? And if yes how?

2
  • I'm having the same problem. I need the manifest.json since I want my app to be a PWA. Did anyone solved this? Commented Sep 16, 2020 at 12:52
  • I already tried updating the homepage in package.json and creating .env file but that didnt work Commented Sep 16, 2020 at 12:53

3 Answers 3

6

Are you using create-react-app?

The manifest makes only sense when you want that your users can install your app so it works without an internet connection e.g. Thats in the end a Progressive Web App. So for you it's probably fine to just remove the line.

(under which path does your app serve? Maybe you have to specify a base path: https://create-react-app.dev/docs/deployment/#building-for-relative-paths

Sign up to request clarification or add additional context in comments.

1 Comment

Yes I am using create-react-app. Thanks for the response. As it is a normal web page I just remove the line as I have no need for offline functionality:D
0

For production apps, you have to target build for the public in firebase.json like the following:

{ "hosting": { "public": "build", // Here you have to make changes. "ignore": [ "firebase.json", "**/.*", "**/node_modules/**" ], "rewrites": [ { "source": "**", "destination": "/index.html" } ], "headers": [ {"source": "/service-worker.js", "headers": [{"key": "Cache-Control", "value": "no-cache"}]} ] } } 

Comments

-2

have you tried this?

go to angular.json

add manifest.json location in assets

"assets": [ "src/favicon.ico", "src/assets", "src/manifest.json" ], 

my angular.json file

restart dev server using ng serve

1 Comment

I think this is a React app

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.