easy-deploy-bundle icon indicating copy to clipboard operation
easy-deploy-bundle copied to clipboard

Error: Invalid argument or option - '/usr/local/bin/composer' on command ./bin/console deploy

Open MehyarSawas opened this issue 7 years ago • 4 comments

Hello there, I was trying to deploy my Symfony 3.3 app on locally on Windows 10 x64 using EasyCrop and I've got this error:

[Symfony\Component\Process\Exception\ProcessFailedException] The command "where /usr/local/bin/composer" failed.

Exit Code: 2(Misuse of shell builtins)

Working directory: C:\xampp\htdocs\bigEventsApp

Output:

================

Error Output:

================ ERROR: Invalid argument or option - '/usr/local/bin/composer'. Type "WHERE /?" for usage help.

After a long time of searching for a solution I've realised that the problem starts with the DefaultConfiguration.php line 35 Where the app is trying to find the composer using the default path which is defined in the variable $remoteComposerBinaryPath. I've tried to give the path of the composer.phar which I've located in the root directory of my project, but it didn't work still getting the same error with the new path. I am not sure if being on the right way to solve this problem or not? Any idea to solve this problem?

Regards, Mehyar Sawas

MehyarSawas avatar Mar 11 '18 11:03 MehyarSawas

Same here:

[OK] The server allows to login via SSH from the local machine
[**hidden**@**hidden**] Executing command: which /usr/local/bin/composer

In Process.php line 239:

  [Symfony\Component\Process\Exception\ProcessFailedException]
  The command "ssh **hidden**@**hidden** 'which /usr/local/bin/composer'" failed.

  Exit Code: 1(General error)

  Working directory: /var/www/my-apps

  Output:
  ================


  Error Output:
  ================


Exception trace:
 Symfony\Component\Process\Process->mustRun() at /var/www/my-apps/vendor/easycorp/easy-deploy-bundle/src/Task/TaskRunner.php:79

numediaweb avatar Aug 18 '18 17:08 numediaweb

Turns out that composer must be installed on the remote server!

numediaweb avatar Aug 18 '18 18:08 numediaweb

I've got a similar problem for a Symfony 4 project.

After bundle installation, I tried this command (for the auto-creation of the file deploy_staging.php) : php bin/console deploy staging

But I have this error : Command "deploy" is not defined

I tried : ./bin/console deploy staging But I have another error : "." is not recognized as an internal command.

eved42 avatar Oct 15 '18 14:10 eved42

Error: Invalid argument or option - '/usr/local/bin/composer' on command ./bin/console deploy

On Remote Server is Composer missing. If its a shared Server there is maybe no luck to get Compopser installed.

benblub avatar Nov 16 '18 10:11 benblub