Solved - Laravel PackageManifest.php: Undefined index: name -- error

Jan 04, 2022

.

Admin

Solved - Laravel PackageManifest.php: Undefined index: name -- error

Hi Dev,

Today, I will show you how to solve PackageManifest.php: Undefined index: name error in laravel.

I had a problem like this, and i'm also tried composer self-update --stable, but there was no result. So, I found that this file belongs to the Laravel framework. So the following command resolved this issue:

Try this, it worked for me, in the following file:

Here I will give an example for PackageManifest.php: Undefined index: name in laravel.So let's see the below example:

Let's start following example.

Step 1 : Find File:


PackageManifest.php

File Path:

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

Step 2 : Add Code:

//Find this line and comment it:

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

//Add two new lines after the above commented line:

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

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

Step 3 : Update Composer:

composer update

I hope it will help you...

#Laravel