capistrano / laravel

Gem for deploying Laravel projects with capistrano v3.*
MIT License
222 stars 71 forks source link

5.8 Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1 #50

Closed jeremiahsherrill closed 4 years ago

jeremiahsherrill commented 5 years ago

Laravel 5.8

EBUG [9485c7aa] Command: cd /var/www/html/mcms/releases/20190328173840 && /usr/bin/env composer install --no-dev --quiet --prefer-dist --optimize-autoloader

DEBUG [9485c7aa] Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1

trying to figure why it keeps failing

keogblem commented 5 years ago

I am having the same issue. Please someone help

Note : I am only facing that error when running composer update online in my web hosting area, not on local server.

Thanks

Gdzieniegdzie commented 5 years ago

Same problem.

keogblem commented 5 years ago

Hi, I got a solution : this issue was due to one of my config/ files that was empty (caused by error when uploading files to server), especially the auth.php which was there but empty (0 octets).

I figure that by running php artisan clear and i got error in the ServiceProvider at line 72 where merging config arrays $this->app['config']->set($key, array_merge(require $path, $config));

So, simple solution : upload again your app files and make sure everything is place 🙂

codermahadi commented 5 years ago

Hi, I got a solution: this issue was due to one of my config/database.php that were empty (caused by an error when the composer updated).

I figure that by running php artisan clear and I got an error in the Database [] not configure DatabaseManage.php at line 252

So, simple solution: upload again your config/database.php files and make sure everything is place 🙂

amirex128 commented 5 years ago

Hi, I got a solution : this issue was due to one of my config/ files that was empty (caused by error when uploading files to server), especially the auth.php which was there but empty (0 octets).

I figure that by running php artisan clear and i got error in the ServiceProvider at line 72 where merging config arrays $this->app['config']->set($key, array_merge(require $path, $config));

So, simple solution : upload again your app files and make sure everything is place 🙂

nice

saeedvz commented 5 years ago

For who has this issue :

I figured out the problem is one of my configs. missing return or using a class that not exists. or something else.

Check configs and be sure that every thing is normal at there

ikari7789 commented 4 years ago

Seems unrelated to capistrano-laravel, so I'm closing this issue.

dericlima commented 4 years ago

Same issue here, on my case the bootstrap/cache directory wasn't with the right permissions. After updating the permissions everything started to work on the cloud server.

muhammadali7768 commented 3 years ago

i cloned a project from github and then run composer install. I got the following error.

Script @php artisan package:discover handling the post-autoload-dump event returned with error code 1

I added .env file and run the composer install command. i got the same error again. Then i deleted composer.lock file and vendor folder and run the composer install command again. The error was gone.

Hillaryudechukwu commented 3 years ago

Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 255 I followed these steps to fix it

  1. ran php artisan clear and got "PHP Fatal error: Uncaught ErrorException: Method, ReflectionParameter::getClass() is deprecated in and not allowed in php 8.0"
  2. My system had php version 8.0.0.4 and ReflectionParameter::getClass() is deprecated to in php version 8
  3. I brew unlink php@8.0.0.4 to downgrade my php and that was the fix
nyachoto12 commented 3 years ago

just run composer update it worked for me