Script @PHP Artisan Package:Discover Handling the Post-Autoload-Dump Event Returned with Error Code 255

Laravel 8 - Windows - package discover post-autoload-dump event returned with error code 255

I found how to edit my php.ini in my Windows as administrator, following this link :

  1. Press the Windows logo (bottom left)
  2. Type Notepad in the search field
  3. Click right on the Notepad and select Run as administrator
  4. From Notepad, click on File > Open and paste C:\Program Files\PHP\v7.4\php.ini
  5. I added the line extension=php_fileinfo.dll
  6. Save

Now, all works fine and I can use composer install

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

Add this in composer.json. Then dusk has to be installed explicitly in your project:

"extra": {
"laravel": {
"dont-discover": [
"laravel/dusk"
]
}
},

I found this solution here

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

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

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

So it looks like the issue was due to having multiple versions of php and copy and paste.
Likely the version of php that composer was using had the extension folder point to a different version's extension folder.

If I had properly installed the different versions, I would not have gotten the issue.

Removal of all unused php versions and the reinstall of composer has fixed this issue.



Related Topics



Leave a reply



Submit