In PackageManifest.php line 122: Undefined index: nam code example
Example: In PackageManifest.php line 122: Undefined index: name
updating in file vendor/laravel/framework/src/Illuminate/Foundation/PackageManifest.php
$installed = json_decode($this->files->get($path), true);
$packages = $installed['packages'] ?? $installed;