After an update or after removing an extension in Magento 2, you may see the error No such file or directory in composer autoload_real.php in the command line. The exact message depends on the Magento version and will look something like this:
Warning: require(/vendor/composer/.../registration.php): failed to open stream: No such file or directory in /vendor/composer/autoload_real.php on line 123
You can fix the issue by running the following command from the Magento 2 root directory:
|
1 |
composer dumpautoload |
The error should now be gone and you should be able to continue working normally.
Fixing No such file or directory in Composer autoload_real.php
Need help implementing this solution, or still looking for a fix to your Magento problem? Get in touch and I will be happy to help with your project.