question

Simodev-2054 avatar image
0 Votes"
Simodev-2054 asked SagarWankhede-2644 commented

i got this error when i tried to git push | [ErrorException] : composer failed

I have been following this tutorial (Tutorial: Build a PHP and MySQL app in Azure App Service) https://docs.microsoft.com/en-us/azure/app-service/tutorial-php-mysql-app?pivots=platform-linux#deploy-to-azure

the problem is when i try to git push git push azure master
i get this error.

 remote: Loading composer repositories with package information
 remote: Installing dependencies (including require-dev) from lock file
 remote:
 remote:
 remote: An error has occurred during web site deployment.
 remote:   [ErrorException]
 remote: composer failed
 remote:   "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?
 remote:
 remote:
 remote: install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--no-suggest] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|classmap-authoritative] [--apcu-autoloader] [--ignore-platform-reqs] [--] [<packages>]...
 remote:
 remote: Deployment Logs : 'https://larave-tasks.scm.azurewebsites.net/newui/jsonviewer?view_url=/api/deployments/dae345ee76d1755cfccd62004c6fc0c472fed981/log'
 To https://larave-tasks.scm.azurewebsites.net/larave-tasks.git
  * [new branch]      master -> master

Can someone help me solve this error ...

azure-webappsazure-webapps-content-deployment
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

still not working

0 Votes 0 ·

1 Answer

ajkuma-MSFT avatar image
0 Votes"
ajkuma-MSFT answered

Thanks for the sharing the Azure docs and the steps that you're referring to. Just to isolate the issue, kindly try the following steps:

If you haven’t done this already, Access the log stream - You can also inspect the log files in a browser at https://<app-name>.scm.azurewebsites.net/api/logs/docker
Also, review - http://sitename.scm.azurewebsites.net/deploymentlogs/ logs.

Just to highlight , App Service Linux uses Oryx to build/install packages for PHP by default. To understand how Oryx works go to our App Service Linux Deploy Oryx -
The PHP toolset is run when a composer.json file exists in the root of the repository.
Are you leveraging custom script?

Test the app locally in production mode.
Review -depending on your composer.json, different packages may be installed for production mode (require vs. require-dev (in your case))

Run your app in App Service in debug mode.
For Laravel, you can configure your app to output debug messages in production by setting the APP_DEBUG app setting to true on Azure Portal.

Ensure that the branch is not locked.
Since your Git repository is in main branch, you may set the default deployment branch for your App Service app to main and test.

Kindly let us know, we will follow-up with you further.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.