简体   繁体   English

Angular 应用程序在 Azure 部署后显示错误

[英]Angular app shows error after Azure deploy

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我有一个 Angular 应用程序,它使用“传单”package 显示 map,然后从该 map 上的文件中提取一些数据。该应用程序在本地主机上运行完美,但是当我将它部署到“Azure Web 应用程序”时,它显示以下错误:服务器错误

Has anyone seen that error before and knows how to solve it?有没有人以前见过这个错误并且知道如何解决它?

Thanks in advance, Paul提前致谢, 保罗

Thank you SnehaAgrawal-MSFT ,Posting your suggestion as an answer to help other community members.谢谢SnehaAgrawal-MSFT ,发布您的建议作为帮助其他社区成员的答案。

"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. “如果您在 /home/site/wwwroot 文件夹中有任何文件,请在您的应用程序设置中确认一下?如果没有,这可能是导致此错误的原因。如果是这样,建议您使用 go 访问您的应用程序服务,在设置下单击配置 > 路径映射 > 您将看到“虚拟应用程序和目录。

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.您的虚拟路径应该是“/”,物理路径应该是“site/wwwroot/” 将您的物理路径更改为“site/wwwroot/'appname'” “appname”应该是您的应用程序的名称。 Or it should be whatever folder is inside of your "dist".或者它应该是你的“dist”中的任何文件夹。

You can refer to this blog for How to Deploy an Angular application to Azure Web Service " 如何将Angular应用部署到Azure Web服务可以参考这篇博客》

For more information please refer the below links:有关更多信息,请参阅以下链接:

. . Server Error in '/' Application while deploying a Angular App on Azure | 在 Azure 上部署 Angular 应用程序时“/”应用程序出现服务器错误 | SO THREAD . 所以线程

. . Unable to deploy React JS application on Azure App service | 无法在 Azure 应用服务上部署 React JS 应用 | SO THREAD 所以线程

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 错误 GitHub 操作部署到 Azure Web 应用程序 - Error with GitHub Action Deploy to Azure Web App Azure Devops如何部署static angular app到azure blob存储 - Azure Devops how to deploy static angular app to azure blob storage 我可以将 Angular 应用程序部署到 Azure 中已有的 WebAPI 应用程序吗? - Can I deploy an Angular App to an already existing WebAPI app in Azure? 在 Azure 应用服务部署上安装 npm package 时出错 - Error installing npm package on Azure app service deploy 如何使用 VSCode 修复 Azure web 应用程序部署错误? - How fix Azure web app deploy error with VSCode? 部署Azure function到微软Azure中的应用服务 - Deploy Azure function to app service in Microsoft Azure Azure Devops 管道返回:'无法将 web package 部署到应用服务。 内部服务器错误(代码:500)' - Azure Devops Pipeline returning: 'Failed to deploy web package to App Service. Internal Server Error (CODE: 500)' 部署 Azure 应用服务时出错:ERROR_COULD_NOT_CONNECT_TO_REMOTESVC - Error while Deploy Azure App Service : ERROR_COULD_NOT_CONNECT_TO_REMOTESVC 如何将python app部署到Azure Function - How to deploy python app to Azure Function 如何从github部署到Azure应用服务 - How to Deploy from github to Azure App Service
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM