magento2: Error when typing "php bin/magento setup:di:compile"

 /var/www/html # php bin/magento setup:di:compile

PHP Fatal error:  Uncaught Error: Class 'Magento\Framework\Component\ComponentRegistrar' not found in /var/www/html/vendor/mageplaza/module-core/registration.php:22
Stack trace:
#0 /var/www/html/vendor/composer/autoload_real.php(55): require()
#1 /var/www/html/vendor/composer/autoload_real.php(45): composerRequire8edf7e1cfb0483e6d59a13e843baed49('6b5b87bda6fedcf...', '/var/www/html/v...')
#2 /var/www/html/vendor/autoload.php(7): ComposerAutoloaderInit8edf7e1cfb0483e6d59a13e843baed49::getLoader()
#3 /var/www/html/app/autoload.php(30): include('/var/www/html/v...')
#4 /var/www/html/app/bootstrap.php(30): require_once('/var/www/html/a...')
#5 /var/www/html/bin/magento(14): require('/var/www/html/a...')
#6 {main}
  thrown in /var/www/html/vendor/mageplaza/module-core/registration.php on line 22

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 21 (12 by maintainers)

Most upvoted comments

composer install
bin/magento setup:upgrade

Can I install magento 2 without UI interaction. e.g. using php bin/magento ??