I'm having a problem with the Azure Web Application. The problem is this ... After creating a Web Service that uses a Linux service plan to upload my front-end app that was developed in React.js, the following error started to appear after a day of testing ... when i click on my website link it loads for about 5 minutes (this time can vary up to 15 minutes), and an error appears - :( Application Error , together with a link for Azure Diagnostics. This link takes me to a screen where it shows me some errors and a table with errors 503 and 502.3, I'll put the image here in the post, I just don't know what to do, I started using azure a short time ago and this is my first contact with this type of error.
discussion about the bug in the microsoft community
The link above shows a discussion that I opened in the microsoft community where I followed the tips, however, the error persisted.
In one of my last attempts I cleared my code cache in Visual Studio Code and deleted the node modules, after that I executed the command "yarn install" and when I tried to perform the deployment I received a different error with the name "npm ERR! code ELIFECYCLE".
As was requested in one of the comments I created a repository and made the code I am trying to deploy for testing available ... follow the link github.com/LucasClaraCloud/project_Frontend-
Your project is too complicated. After testing, I can only provide you with an idea. It works for me
- Deploy the build folder generated after
npm run build
to the/home/site/wwwroot
folder path.
- Then add startup command on portal with
npx serve -s
.**
Under normal circumstances, deployment is the folder after deploying the build. The advantages are as follows,
1. Security
This can protect the security of the file code. Generally, few developers will directly deploy source code files to a web server.
2. Fast
The compiled files are relatively small and the deployment is very fast.
Test steps and phenomena::
Use github for continuous deployment. In the git action, the release is successful, but the web page prompts the same as you described, Application Error. View the log the same as yours.
Try to FTP the project file to wwwroot (no node_modules folder), and then execute npm install. It runs for a long time, and finally an error occurs.