'Composer fails with kylekatarnls/update-helper on new homestead
I have installed a homestead on a new computer. I have pulled my code (which is working on my other computer as well as the server). My project is made in Laravel 5.7
When I do a composer require to get everything in place to, i get this error: Plugin kylekatarnls/update-helper could not be initialized, class not found
I have tried composer clear:cache, reinstalled the homestead-7 box. Non of it has worked. I still get the same error
But no matter what I get the same error
composer require
1/5: http://repo.packagist.org/p/provider-latest$a806a8d210ac003dea5f466b7eb4360aba21e7db378947d94fcc05f1c43d2921.json
2/5: http://repo.packagist.org/p/provider-2018-07$83d74e8f8f017f24768634de8431b0765d0193abe8fbae5dc508c608fa446a16.json
3/5: http://repo.packagist.org/p/provider-2019-01$39b4da101da77b6e7b2cf4b4b1d980900210eb4dc0455c762726efd19cd793cc.json
4/5: http://repo.packagist.org/p/provider-2018$326068043f2252c1742720ee06d5e82793507c5e5c4d0cb92b8984efba4c0a68.json
5/5: http://repo.packagist.org/p/provider-2019-04$5fd19400095ad7859026c523bd91494ff8aa62916e28c96588e6038b502f52cc.json
Finished: success: 5, skipped: 0, failure: 0, total: 5
Search for a package:
./composer.json has been updated
1/5: http://repo.packagist.org/p/provider-latest$3ce6543780da13f101ad846e0e24450290d158e25e24ffa46271e41ee96db5d3.json
2/5: http://repo.packagist.org/p/provider-2018-07$83d74e8f8f017f24768634de8431b0765d0193abe8fbae5dc508c608fa446a16.json
3/5: http://repo.packagist.org/p/provider-2018$326068043f2252c1742720ee06d5e82793507c5e5c4d0cb92b8984efba4c0a68.json
4/5: http://repo.packagist.org/p/provider-2019-01$39b4da101da77b6e7b2cf4b4b1d980900210eb4dc0455c762726efd19cd793cc.json
5/5: http://repo.packagist.org/p/provider-2019-04$5fd19400095ad7859026c523bd91494ff8aa62916e28c96588e6038b502f52cc.json
Finished: success: 5, skipped: 0, failure: 0, total: 5
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 109 installs, 0 updates, 0 removals
- Installing kylekatarnls/update-helper (1.1.1): Loading from cache
Plugin installation failed, rolling back
- Removing kylekatarnls/update-helper (1.1.1)
Installation failed, reverting ./composer.json to its original content.
[UnexpectedValueException]
Plugin kylekatarnls/update-helper could not be initialized, class not found
: UpdateHelper\ComposerPlugin
Solution 1:[1]
I tried
composer global require kylekatarnls/update-helper
then it worked
Solution 2:[2]
Install without plugins if they're not necessary for you.
composer install --no-plugins
Solution 3:[3]
I found that actually upgrading from version 8.0.0 of the vagrant box to 8.0.1 solved this for me So in the homestead folder run
vagrant box update
Solution 4:[4]
I assume the lateste laravel / homestead box is incompatible with laravel 5.7.*. In the homestead/script/homestead.rb I changed line 21 to: config.vm.box_version = settings['version'] ||= '= 7.1.0'
thereby I forced my homestead to only use box v. 7.1.0 (as on my other computer).
vagrant up
vagrant ssh
composer require
worked like a charm.
Solution 5:[5]
I think you should try to disable any configuration of IP6 for your NICs. Yesterday (July, 4th), I had the same issue and I tried a lot of things. Nothing! but ... suddenly I tried to check out more information about the composer's issues and ... Eureka! sometimes the Composer does not work with any IP6 config. You can read more about it here: https://getcomposer.org/doc/articles/troubleshooting.md
Solution 6:[6]
I upgraded composer to its latest version and it solved! In order to upgrade composer, first go to composer directory, then use following command:
php composer.phar self-update
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Hazem Mohamed |
Solution 2 | Yue Wang |
Solution 3 | sparkdoo |
Solution 4 | nofinator |
Solution 5 | Alexandre Barbosa |
Solution 6 | good_spring |