How to Fix Error: Laravel PackageManifest.php: line 122 Undefined index: name

2177
Share:
how-to-fix-error-laravel-packagemanifest-php-line-122-undefined-index-name

Being a web developer for years, most of us surely have many archived applications or unmaintained applications to be exact. With the popularity of composer usage these years, we can minimize our repository size. Using composer, we can separate between our code and our application's libraries. Hence, the repository only stores our code and reference to libraries being used.

The idea is great. However, there's a time when it won't work out of the box. Yesterday, I wanted to clone my old Laravel application from my Bitbucket repository and revisit my old code. The clone itself runs fine, but when I'm trying to run composer install, it throws this error: "In PackageManifest.php line 122:"

I think I've done it correctly. Based on their documentation:

  • composer update: for applications that don't have composer.lock file.
  • composer install: for applications that already have composer.lock file.

Because my repository already has a composer.lock file, I'm running composer install. However, as mentioned before, it throws PackageManifest error.

I am sure the repository should be fine, because I used it to install on the client side then. I won't change any code In my local PC, so if anything went south I could just do a git reset. So I decided to try out composer update, see if it works. Luckily this one works and I can continue with my code revisit.

Summary

Try to run composer update if you face any issue with composer install.

Tags PHP
Share:

0 comment

Leave a reply

Your email address will not be published. Required fields are marked *