I updated the composer with this command:
composer self-update
It was updated to version 2.0.4. Then when I tried to launch my Laravel project using:
php artisan serve
I got this error:
In PackageManifest.php line 131:
Undefined index: name
I tried getting back to the old version of the composer with this:
composer self-update --rollback
The composer was downgraded to version 1.9.3, but it didn't help with the error. Then I used this command to update the composer again:
composer self-update --stable
And still got the same error.
This is the line 131 of the PackageManifest.php file:
return [$this->format($package['name']) => $package['extra']['laravel'] ?? []];
composer self-updateto update version of composer, did you tried to run againcomposer updatebefore runningphp artisan serve?composer self-update. Then, you trycomposer update. Finally, you runphp artisan serve