Composer fails with kylekatarnls/update-helper on new homestead
Asked Answered
A

7

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
Abrahamsen answered 25/6, 2019 at 15:35 Comment(3)
I have the same issue.Tyro
For what it's worth: this is only with non-supported versions of Laravel. So basically everything that's not 5.5 or 5.8 .Ornie
This happened to my 5.8 version. Solved with @HazemMohamed solutionRemember
O
21

I tried

composer global require kylekatarnls/update-helper

then it worked

Outlast answered 13/10, 2019 at 12:25 Comment(2)
In my case it worked when i removed global from aboveLeninist
This specific command worked in my Laravel Homestead VM after a couple of hours of Kyle Katarn sticking it to me. Why can't you Jedi just do things the simple way?Moiramoirai
C
4

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

composer install --no-plugins

Cryptoanalysis answered 26/7, 2020 at 15:45 Comment(0)
A
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.

Abrahamsen answered 25/6, 2019 at 17:6 Comment(1)
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).Goodwin
A
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
Annelid answered 6/8, 2019 at 0:7 Comment(0)
G
1

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

Giotto answered 9/10, 2022 at 9:30 Comment(0)
Y
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

Yesman answered 4/7, 2019 at 15:20 Comment(0)
A
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
Armada answered 17/4, 2022 at 21:45 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.