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 :
- Press the Windows logo (bottom left)
- Type Notepad in the search field
- Click right on the Notepad and select Run as administrator
- From Notepad, click on File > Open and paste
C:\Program Files\PHP\v7.4\php.ini
- I added the line
extension=php_fileinfo.dll
- 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
Laravel 4 Custom Named Password Column
PHP Array Find Duplicates, Sum Them Up & Delete Duplicates
Post to a Facebook Page Without "Manage_Pages" Permission Using PHP
How Best to Get Someone's 'Rank' from a Scores Table with PHP and MySQL Without Looping
What Is Null Coalescing Assignment = Operator in PHP 7.4
Overriding Upload_Max_Filesize
How to Create a Base64Encoded String from Image Resource
Split Array into Two Arrays by Index Even or Odd
Can't Install PHPunit via Pear, Requires Pear Installer >= 1.9.2, Can't Upgrade Pear from 1.9.0
Get the First or Last Friday in a Month
Compile Error: Cannot Use Isset() on the Result of an Expression
Proper Prevention of Mail Injection in PHP
PHP SQL, Query Returns Only One Row of Data
Protection Against Xss Exploits
Set Active State on Navigation Dynamically
Org.JSON.JSONexception: Value <Br of Type Java.Lang.String Cannot Be Converted to JSONobject