Composer update gives error saying plugin could not be initialized, class not found for every package

Viewed 2737

I've loaded up a vagrant box from scratch with an existing codebase that has been running on several machines for quite a while. When running composer update it always gives a similar issue:

  - Removing kylekatarnls/update-helper (1.1.1)


  [UnexpectedValueException]
  Plugin kylekatarnls/update-helper could not be initialized, class not found: UpdateHelper\ComposerPlugin

php -v:

Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.1.30-1+ubuntu16.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies
    with Xdebug v2.7.1, Copyright (c) 2002-2019, by Derick Rethans

Composer version 1.8.6

I've tried changing versions of vagrant, virtualbox, php, xdebug, composer all to match versions running on other machines. I've tried composer clearcache, composer dump-autoload, various different composer update methods. Have tried deleting vendor folder and doing composer install

2 Answers

I had this issue in a Vagrant box, I removed php7.2-zip from installing and installed ONLY zip.

If I have them both installed, it fails, if I install only php-zip it failed. Not sure if this will help, but might give it a try.

Run composer update --no-plugins.

Related