Ad

Script @php Artisan Package:discover --ansi Handling The Post-autoload-dump Event Returned With Error Code -1073741819

I got some weird error code after I pulled a project out of my github. My first things I do is composer dumpautoload, composer update, and php artisan migrate:fresh --seed whenver I get to a new terminal. This time, I'm stuck at dumpautoload as it generates this error.

Here's what composer update generated

Loading composer repositories with package information
The "https://repo.packagist.org/packages.json" file could not be downloaded: SSL: An existing connection was forcibly closed by the remote host.

send of 158 bytes failed with errno=10054 An existing connection was forcibly closed by the remote host.

failed to open stream: HTTP request failed! 
https://repo.packagist.org could not be fully loaded, package information was loaded from the local cache and may be out of date
Updating dependencies (including require-dev)
Nothing to install or update
Writing lock file
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi
Discovered Package: awobaz/compoships
Discovered Package: facade/ignition
Discovered Package: fideloper/proxy
Discovered Package: intervention/image
Discovered Package: laravel/tinker
Discovered Package: laravel/ui
Discovered Package: maatwebsite/excel
Discovered Package: nesbot/carbon
Discovered Package: nunomaduro/collision
Discovered Package: spatie/laravel-medialibrary
Discovered Package: yajra/laravel-datatables-oracle
Package manifest generated successfully.
Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error
code -1073741819
Ad

Answer

Old (cached) local dependencies or composer.lock file may causes problem like this. You can try to reinstall all dependencies after remove all dependencies and lock file.

To remove downloaded dependencies, execute this inside app base dir;

sudo rm -rf vendor/

after that delete composer.lock file by executing;

sudo rm composer.lock

and finally execute;

composer install
Ad
source: stackoverflow.com
Ad