Home > Software engineering >  Angular app shows error after Azure deploy
Angular app shows error after Azure deploy

Time:10-06

I have an Angular App that shows a map using the "leaflet" package and afterwards draws some data from a file on that map. The App works perfectly on localhost but when I deploy it to "Azure Web App" it shows the following error: Error on server

Has anyone seen that error before and knows how to solve it?

Thanks in advance, Paul

CodePudding user response:

Thank you SnehaAgrawal-MSFT ,Posting your suggestion as an answer to help other community members.

"Just to confirm in your Application Settings if you have any of the files sited here in the /home/site/wwwroot folder? If not, this could be a reason for this error. If so, recommend you go to your app service, under settings Click Configuration > Path mappings > You will see "Virtual applications and directories.

Your virtual path should be "/" and physical path should be "site/wwwroot/" Change your Physical path to "site/wwwroot/'appname'" "appname" should be whatever the name of your application is. Or it should be whatever folder is inside of your "dist".

You can refer to this blog for How to Deploy an Angular application to Azure Web Service "

For more information please refer the below links:

. Server Error in '/' Application while deploying a Angular App on Azure | SO THREAD .

. Unable to deploy React JS application on Azure App service | SO THREAD

  • Related