Error: Invalid argument or option - '/usr/local/bin/composer' on command ./bin/console deploy
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
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
Turns out that composer must be installed on the remote server!
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.
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.