Unable to deploy the react web app in the Azure App service.

Kurve, Mangesh 1 Reputation point
2022-03-08T14:51:52.707+00:00

react-scripts build
Creating an optimized production build...
An unknown error has occurred. Check the diagnostic log for details.
Deployment failed.

I am using the free version of azure service.
Unable to see any logs, why it is failing.

I am using Azure App service extension in the visual studio code. I have also created the web.config file as below :

<?xml version="1.0"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="React Routes" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
<add input="{REQUEST_URI}" pattern="^/(api)" negate="true" />
</conditions>
<action type="Rewrite" url="/" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>

Thanks in advance for the help.

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,997 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. sadomovalex 3,626 Reputation points
    2022-03-08T15:05:04.253+00:00

    try to upload it to Azure app service via FTP: Host React web app on Azure

    0 comments No comments