0

I am working on an upgrade project from Magento 2.3.2.p2 EE to 2.4.4 EE.

After the composer update was done successfully I found the below error while run php bin/magento commands, can anyone help me on the same.

I have already run this composer dumpautoload but not still not working.

$ php bin/magento PHP Warning: require(/home/../vendor/composer/../magento/project-enterprise-edition/app/etc/NonComposerComponentRegistration.php): Failed to open stream: No such file or directory in /home/../vendor/composer/autoload_real.php on line 57 PHP Fatal error: Uncaught Error: Failed opening required '/home/../vendor/composer/../magento/project-enterprise-edition/app/etc/NonComposerComponentRegistration.php' (include_path='/home/../vendor/magento/zendframework1/library:.:/usr/share/php') in /home/../vendor/composer/autoload_real.php:57 Stack trace: #0 /home/../vendor/composer/autoload_real.php(40): composerRequiredb672302d8264da3ebc40879939070dd() #1 /home/../vendor/autoload.php(25): ComposerAutoloaderInitdb672302d8264da3ebc40879939070dd::getLoader() #2 /home/../app/autoload.php(51): include('...') #3 /home/../app/bootstrap.php(43): require_once('...') #4 /home/../bin/magento(14): require('...') #5 {main} thrown in /home/../vendor/composer/autoload_real.php on line 57

1 Answer 1

0
  1. app/etc/NonComposerComponentRegistration.php permissions should be set to 666.

  2. If a setting is missing from your composer.json file, some directories will not copy from the Adobe Commerce Code Base. The package and the update/patch can’t apply because files will not be found.

Please change your extra section to match that provided below.

"extra":{
  "magento-force": true,
  "magento-deploystrategy": "copy"
}

And re-attempt deployment

rm -rf vendor
composer install
bin/magento setup:upgrade
bin/magento setup:di:compile

======
For other, who has below issue (the file path does not the same as the Original Poster):
Warning: require(/var/www/html/app/etc/NonComposerComponentRegistration.php): failed to open stream: No such file or directory, do the following steps to resolve that issue:

  1. Remove the vendor directory and clear the composer cache:
rm -rf vendor
composer clear-cache
  1. Run the following commands:
composer install
bin/magento setup:upgrade
bin/magento setup:di:compile
8
  • I have already tried this but this solution is not working for me. Thank you for your time. Nov 22, 2022 at 5:22
  • Could you confirm app/etc/NonComposerComponentRegistration.php exists? If yes, set permissions for this file to 666, and try run bin/magento commands again.
    – Tu Van
    Nov 22, 2022 at 5:36
  • Yes this file is already exists and permissions is also ok but magento is trying to access this file from vendor/../project-enterprise-edition/app/etc/ Nov 22, 2022 at 5:41
  • That is correct behavior.
    – Tu Van
    Nov 22, 2022 at 5:42
  • Should I need to put this file in the vendor/../project-enterprise-edition/app/etc/ folder? commonly this is on app/etc folder right? Nov 22, 2022 at 5:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.