-2

[I am receiving the all files in console but showing in the frontend and automatically refresh showing the whitescreen][1]

Package.json fileQ5XvT.png

Mike b
  • 1
  • 2
  • could you share the errors from console? – Georgy Mar 03 '22 at 17:31
  • Hi. Welcome to SO. In order help us to get you the answer that you want, have a look at the [tour] and please take the time to read through [ask]. – SiKing Mar 03 '22 at 20:05

2 Answers2

1

To resolve white/blank screen deployment of react app in Azure, try either of the following ways:

  1. In package.json add "homepage": "."

  2. Make sure to publish from build folder instead of public folder

  3. In your index.html, make sure to check to specify correct JavaScript bundle.

References: How to fix the Blank screen After a Static Deployment with create-react-app and I have deployed a azure-webapp and the page displays blank

Ecstasy
  • 1,866
  • 1
  • 9
  • 17
-1

You can see this other post: Blank page after running build on create-react-app

If you're using react-router and trying to open index.html directly in the browser (or using electron, which essentially does that), in addition to setting homepage as others have suggested, replace your BrowserRouter with a HashRouter.