15

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
Siong Thye Goh
  • 3,518
  • 10
  • 23
  • 31
SorenPeter
  • 243
  • 1
  • 4
  • 9

7 Answers7

21

I tried

composer global require kylekatarnls/update-helper

then it worked

Hazem Mohamed
  • 564
  • 3
  • 7
4

Install without plugins if they're not necessary for you.

composer install --no-plugins

Yue Wang
  • 41
  • 2
2

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.

nofinator
  • 2,906
  • 21
  • 25
SorenPeter
  • 243
  • 1
  • 4
  • 9
  • I did this, but ended up having to drop all the way back to 6.4.0, because 7.1.0 did not work with CORS (barryvdh/laravel-cors). – ironic_ollins Jul 11 '19 at 13:46
2

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
sparkdoo
  • 522
  • 1
  • 5
  • 13
0

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

Alexandre Barbosa
  • 1,194
  • 1
  • 7
  • 6
0

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
0

Had the same problem when running composer in Docker, and solved it by using the following command: composer config --no-plugins allow-plugins.kylekatarnls/update-helper true

Ricky
  • 2,912
  • 8
  • 47
  • 74