Error Laravel PackageManifest php Undefined index name

0 votes
I'm just trying to deploy my application and I just ran composer update on my server and I got the following error:

In PackageManifest.php line 122: Undefined index: name

How can I fix this issue?
Dec 3, 2020 in Laravel by kartik
• 37,520 points
24,936 views

1 answer to this question.

+2 votes

Hello,

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

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

Find this line and comment it

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

Add two new lines after above commented line

$installed = json_decode($this->files->get($path), true);
$packages = $installed['packages'] ?? $installed;
answered Dec 3, 2020 by Niroj
• 82,840 points
Thank you so much.  You have saved my life with that contribution.
Thank you Dude, It worked for me.
thank you so much
thankyou, this works for me
thank you very much

Yes, It worked for me. 

Senario: I have Downloaded a codebase from another computer, and tried to setup in my laptop. There I found project has laravel 5.8 version, so I upgraded it to 6.0.4.

Steps:-

1. Upgraded Composer.json

"license": "MIT",
    "require": {
        "php": "^7.1.3",
        "fideloper/proxy": "^4.0",
        "laravel/framework": "5.8.*",
        "laravel/tinker": "^1.0"
    },

===>>>

"license": "MIT",
    "require": {
        "php": "^7.1.3",
        "fideloper/proxy": "^4.0",
        "laravel/framework": "6.0.*",
        "laravel/tinker": "^1.0"
    },

2.  Run "Composer update" in bash

~~~~~ Then I got the error

Solution: 

1. Removed "composer.lock" from root => not worked

2.  added bellow lines in  "PackageManifest.php" after " $packages = json_decode($this->files->get($path), true);" => now the issue is resolved.

$installed = json_decode($this->files->get($path), true);
$packages = $installed['packages'] ?? $installed;

It also worked for me. Thanks a lot.

Related Questions In Laravel

0 votes
1 answer

Error: Class 'TestCase' not found in D:\xampp\htdocs\laravel\app\tests\ExampleTest.php on line 3 ,

Hello @kartik, Run following command in your project's ...READ MORE

answered Sep 28, 2020 in Laravel by Niroj
• 82,840 points
2,363 views
0 votes
1 answer

How to give custom field name in laravel form validation error message?

Hello @kartik, You can specify custom error message ...READ MORE

answered Sep 30, 2020 in Laravel by Niroj
• 82,840 points
5,033 views
0 votes
1 answer

Error:Laravel requires the Mcrypt PHP extension.

Hello, Use which php in the terminal to see which ...READ MORE

answered Nov 11, 2020 in Laravel by Niroj
• 82,840 points
1,208 views
+1 vote
1 answer

How to make anchor tag with routing using Laravel?

Hey @kartik, First you have to go to ...READ MORE

answered Mar 18, 2020 in Laravel by Niroj
• 82,840 points
23,446 views
0 votes
1 answer

What is redirection in Laravel?

Named route is used to give specific ...READ MORE

answered Mar 18, 2020 in Laravel by Niroj
• 82,840 points
3,135 views
0 votes
1 answer

How to install Laravel via composer?

Hello, This is simple you just need to ...READ MORE

answered Mar 23, 2020 in Laravel by Niroj
• 82,840 points
3,168 views
+1 vote
1 answer

What are named routes in Laravel and How can specify route names for controller actions?

Hey @kartik, Named routing is another amazing feature of ...READ MORE

answered Mar 23, 2020 in Laravel by Niroj
• 82,840 points
45,587 views
0 votes
1 answer

Error:Laravel PHP Command Not Found

Hello @kartik, Try the follwing snippet: nano ~/.bash_profile And ...READ MORE

answered Jul 30, 2020 in Laravel by Niroj
• 82,840 points
7,251 views
0 votes
1 answer

How Can I Remove “public/index.php” in the URL Generated Laravel?

Hello @kartik, If it isn't already there, create ...READ MORE

answered Aug 10, 2020 in Laravel by Niroj
• 82,840 points
13,720 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP