Deployer The command "/usr/bin/php /var/www/html/.../artisan --version" failed.
Develeapment opened this issue · 5 comments
| Q
| Issue Type | Question
| Deployer Version | 6.0.3
| Recipes Version | N/A
| Local Machine OS | MacOS Sierra High
| Remote Machine OS | Ubuntu
Description
I am trying to deploy to a machine, that worked like a charm yesterday. I don't recall changing anything, but it throws an error:
The command "/usr/bin/php /var/www/html/..../artisan --version" failed.
with Exit Code: 1 (General error)
Output log
With enabled option for verbose output -vvv
.
In Client.php line 96:
[Deployer\Exception\RuntimeException (1)]
The command "/usr/bin/php /var/www/html/projectname.com/releases/1/artisan --version" failed.
Exit Code: 1 (General error)
Host Name: projectname.com
================
Exception trace:
Deployer\Ssh\Client->run() at /Users/mac/Code/projectname/vendor/deployer/deployer/src/functions.php:292
Deployer\run() at /Users/mac/Code/projectname/vendor/deployer/deployer/recipe/laravel.php:39
Deployer\Deployer::Deployer{closure}() at n/a:n/a
call_user_func() at /Users/mac/Code/projectname/vendor/deployer/deployer/src/Configuration/Configuration.php:87
Deployer\Configuration\Configuration->get() at /Users/mac/Code/projectname/vendor/deployer/deployer/src/functions.php:526
Deployer\get() at /Users/mac/Code/projectname/vendor/deployer/deployer/recipe/laravel.php:124
Deployer\Deployer::Deployer{closure}() at n/a:n/a
call_user_func() at /Users/mac/Code/projectname/vendor/deployer/deployer/src/Task/Task.php:104
Deployer\Task\Task->run() at /Users/mac/Code/projectname/vendor/deployer/deployer/src/Executor/SeriesExecutor.php:63
Deployer\Executor\SeriesExecutor->run() at /Users/mac/Code/projectname/vendor/deployer/deployer/src/Console/TaskCommand.php:142
Deployer\Console\TaskCommand->execute() at /Users/mac/Code/projectname/vendor/symfony/console/Command/Command.php:252
Symfony\Component\Console\Command\Command->run() at /Users/mac/Code/projectname/vendor/symfony/console/Application.php:936
Symfony\Component\Console\Application->doRunCommand() at /Users/mac/Code/projectname/vendor/deployer/deployer/src/Console/Application.php:132
Deployer\Console\Application->doRunCommand() at /Users/mac/Code/projectname/vendor/symfony/console/Application.php:240
Symfony\Component\Console\Application->doRun() at /Users/mac/Code/projectname/vendor/symfony/console/Application.php:148
Symfony\Component\Console\Application->run() at /Users/mac/Code/projectname/vendor/deployer/deployer/src/Deployer.php:324
Deployer\Deployer::run() at phar:///usr/local/bin/dep/bin/dep:119
require() at /usr/local/bin/dep:4
Thanks for any help, much appreciated!
@Develeapment did you solve it? I have the same problem
Can't recall, sorry! I think it was merely getting back to an older version, since something broke in that release?
So what's problem? Please describe.
I have the same problem. I have two laravel projects. Both version 5.5. In one everything is working ok, in the other I get the same error... When I deploy it, there is no vendor folder but there is also no error for deploy:vendor task... The only difference is they are deployed to different VPS servers... The one that is working is on manually configured rackspace cloud, the other is on digitalocean's vps managed by serverpilot...
I faced the same problem and it turned out that I had removed my storage folder from the .gitignore
file and the same got pushed to the remote server upon deployment which caused this error. This has got nothing to do with deployer but with Laravel itself.
Just so it helps someone with the same issue, this is how I resolved it:
- Add the
/public/storage
folder to your.gitignore
file. - Ensure it is removed from your git cache as well
git rm --cached
- Push the latest release to git and ensure that
/public/storage
has been removed successfully. - Use the deployer to revert back to a previous release on the server
dep rollback <host>
- now deploy the most recent release once again
dep deploy <host>
Hope this helps !