I am using Magento 2.4.5 and php 8.1
when I try to sudo php bin/magento setup:di:compile
I get this error:
Compilation was started.
Repositories code generation... 1/9 [===>------------------------] 11% 1 sec 119.0 MiBUnclosed '{' on line 23#0 /var/www/magento2/vendor/composer/ClassLoader.php(428): ComposerAutoloadincludeFile()
#1 [internal function]: ComposerAutoloadClassLoader->loadClass()
#2 /var/www/magento2/setup/src/Magento/Setup/Module/Di/Code/Reader/ClassesScanner.php(134): class_exists()
#3 /var/www/magento2/setup/src/Magento/Setup/Module/Di/Code/Reader/ClassesScanner.php(117): MagentoSetupModuleDiCodeReaderClassesScanner->includeClass()
#4 /var/www/magento2/setup/src/Magento/Setup/Module/Di/Code/Reader/ClassesScanner.php(87): MagentoSetupModuleDiCodeReaderClassesScanner->extract()
#5 /var/www/magento2/setup/src/Magento/Setup/Module/Di/App/Task/Operation/RepositoryGenerator.php(61): MagentoSetupModuleDiCodeReaderClassesScanner->getList()
#6 /var/www/magento2/setup/src/Magento/Setup/Module/Di/App/Task/Manager.php(56): MagentoSetupModuleDiAppTaskOperationRepositoryGenerator->doOperation()
#7 /var/www/magento2/setup/src/Magento/Setup/Console/Command/DiCompileCommand.php(216): MagentoSetupModuleDiAppTaskManager->process()
#8 /var/www/magento2/vendor/symfony/console/Command/Command.php(255): MagentoSetupConsoleCommandDiCompileCommand->execute()
#9 /var/www/magento2/vendor/symfony/console/Application.php(1009): SymfonyComponentConsoleCommandCommand->run()
#10 /var/www/magento2/vendor/symfony/console/Application.php(273): SymfonyComponentConsoleApplication->doRunCommand()
#11 /var/www/magento2/vendor/magento/framework/Console/Cli.php(116): SymfonyComponentConsoleApplication->doRun()
#12 /var/www/magento2/vendor/symfony/console/Application.php(149): MagentoFrameworkConsoleCli->doRun()
#13 /var/www/magento2/bin/magento(23): SymfonyComponentConsoleApplication->run()
#14 {main}
I checked the debug log and system logs and nothing there. How do I debug this?
thx