Skip to content

Composer update created error: require(vendor/magento/composer-root-update-plugin/registration.php): failed to open stream: No such file or directory

I have updated Composer to 2.4.4 as a prerequisite to updating Magento to 2.4.5, however now I’m getting errors in SSH when trying to run any other command and HTTP on a page execution:

SSH:

In AutoloadGenerator.php line 1351:
                                                                                                                                                                         
  require(/home/---/web/---/public_html/vendor/magento/composer-root-update-plugin/registration.php): failed to open stream: No such file or directory

HTTP:

Warning: require(/home/---/web/---/public_html/vendor/composer/../magento/composer-root-update-plugin/registration.php): failed to open stream: No such file or directory in /home/xadmin/web/xdev.devsetup.co.uk/public_html/vendor/composer/autoload_real.php on line 59

Fatal error: require(): Failed opening required '/home/---/web/---/public_html/vendor/composer/../magento/composer-root-update-plugin/registration.php' (include_path='/home/xadmin/web/xdev.devsetup.co.uk/public_html/vendor/magento/zendframework1/library:.:/usr/share/php') in /home/---/web/---/public_html/vendor/composer/autoload_real.php on line 59

Composer won’t rollback – tried that and received the same errors. Confirmed the file doesn’t exist, but the directory does.

I’m assuming /public_html/vendor/composer/../magento/composer-root-update-plugin/ in the HTTP error is the same as /public_html/vendor/magento/composer-root-update-plugin/ in SSH, but posted in case it helps you help me.

Does anyone know how I can get past this?

Thanks