1

Compilation was started.

Repositories code generation... 1/9 [===>------------------------]  11% < 1 sec 77.0 MiBClass "Rsg\Enquiry\Controller\Index\Magento\Framework\View\Element\Template" not found#0 /home/livinghabitat/public_html/vendor/composer/ClassLoader.php(571): include()
#1 /home/livinghabitat/public_html/vendor/composer/ClassLoader.php(428): Composer\Autoload\includeFile('/home/livinghab...')
#2 [internal function]: Composer\Autoload\ClassLoader->loadClass('Rsg\\Enquiry\\Con...')
#3 /home/livinghabitat/public_html/setup/src/Magento/Setup/Module/Di/Code/Reader/ClassesScanner.php(134): class_exists('Rsg\\Enquiry\\Con...')
#4 /home/livinghabitat/public_html/setup/src/Magento/Setup/Module/Di/Code/Reader/ClassesScanner.php(117): Magento\Setup\Module\Di\Code\Reader\ClassesScanner->includeClass('Rsg\\Enquiry\\Con...', '/home/livinghab...')
#5 /home/livinghabitat/public_html/setup/src/Magento/Setup/Module/Di/Code/Reader/ClassesScanner.php(87): Magento\Setup\Module\Di\Code\Reader\ClassesScanner->extract(Object(RecursiveIteratorIterator))
#6 /home/livinghabitat/public_html/setup/src/Magento/Setup/Module/Di/App/Task/Operation/RepositoryGenerator.php(61): Magento\Setup\Module\Di\Code\Reader\ClassesScanner->getList('/home/livinghab...')
#7 /home/livinghabitat/public_html/setup/src/Magento/Setup/Module/Di/App/Task/Manager.php(56): Magento\Setup\Module\Di\App\Task\Operation\RepositoryGenerator->doOperation()
#8 /home/livinghabitat/public_html/setup/src/Magento/Setup/Console/Command/DiCompileCommand.php(216): Magento\Setup\Module\Di\App\Task\Manager->process(Object(Closure), Object(Closure))
#9 /home/livinghabitat/public_html/vendor/symfony/console/Command/Command.php(255): Magento\Setup\Console\Command\DiCompileCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 /home/livinghabitat/public_html/vendor/symfony/console/Application.php(1009): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#11 /home/livinghabitat/public_html/vendor/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand(Object(Magento\Setup\Console\Command\DiCompileCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#12 /home/livinghabitat/public_html/vendor/magento/framework/Console/Cli.php(115): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#13 /home/livinghabitat/public_html/vendor/symfony/console/Application.php(149): Magento\Framework\Console\Cli->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#14 /home/livinghabitat/public_html/bin/magento(23): Symfony\Component\Console\Application->run()
#15 {main}

I am getting this error when compiling my code. kindly help if someone can.

A big thanks in advance

2 Answers 2

4

Looks like you have incorrect using of \Magento\Framework\View\Element\Template (in current namespace instead of global) in \Rsg\Enquiry\Controller\Index

I suggest to review \Rsg\Enquiry\Controller\Index and check how and when Magento\Framework\View\Element\Template used and fix namespace issue

1

There are many reasons for this:

  • Check the composer version
  • FPM is installed
  • Having Custom Template issue

Most Probably its the reason of the composer version.

Thanks!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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