Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 297 Vote(s) - 3.48 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Laravel PackageManifest.php line 131: Undefined index: name

#1
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'] ?? []];
```
Reply

#2
First, you should check again version after using `composer self-update`. Then, you try `composer update`. Finally, you run `php artisan serve`.
Reply

#3
add code in Illuminate\Foundation\PackageManifest.php about to line 129:

...
$ignoreAll = in_array('*', $ignore = $this->packagesToIgnore());
// ------------------:::::::::FIX::::::::::------------
if (isset($packages['packages'])){
$packages = $packages['packages'];
}
// ---------------------------ENDFIX-------------------
$this->write(collect($packages)->mapWithKeys(function ($package) {
...
Reply

#4
This was actually fixed in Laravel already, so please make sure you update Laravel to at least 6.18.7+ or 7.6.0+ or 8.0+

FYI, if you remove composer local file, it will update all your dependencies, so it's not a good idea.

By running the command `composer update laravel/framework` should hopefully fix the issue and not cause any other problems. If you can not update Laravel then you better off downgrade to Composer 1 using `composer self-update --1`.

If you are using `illuminate/foundation` instead of `laravel/framework`, then make sure you `composer update illuminate/foundation` instead.
Reply

#5
Option 1:

Open
vendor/laravel/framework/src/Illuminate/Foundation/PackageManifest.php

then search code :

$packages = json_decode($this->files->get($path), true);

insert

$packages = $installed['packages'] ?? $installed;

Option 2 :

run command

composer update
Reply

#6
this helped me :

downgrade to Composer 1 using

composer self-update --1
Reply

#7
The issue is one of the Laravel default vendor packages has a small bug.

The solution to fix this is the following:

rm -rf composer.lock
rm -rf vendor
composer install

This will update the composer packages to the latest versions for your current version of laravel and this should resolve the issue.
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through