Fatal error since installed Mautic API

Your software
My Mautic version is: 4.1.0
My PHP version is: 7.4.27
My Database type and version is: 8.0.27

Your problem
My problem is:
I run composer require mautic/api-library
It run successfully, but since then I’m getting this error on the main Mautir URL

These errors are showing in the log:
**Fatal error** : Uncaught Error: Class 'Mautic\CoreBundle\ErrorHandler\ErrorHandler' not found in D:\inetpub\vhosts\******.com\wwwroot\m.******.com\public\index.php:22 Stack trace: #0 {main} thrown in **D:\inetpub\vhosts\******.com\wwwroot\m.******.com\public\index.php** on line **22**

Steps I have tried to fix the problem:

This is the log:

D:\inetpub\vhosts*****.com\wwwroot\m.*****.com\public>composer require mautic/api-library
Using version ^3.0 for mautic/api-library
./composer.json has been created
Running composer update mautic/api-library
Loading composer repositories with package information
Updating dependencies
Lock file operations: 2 installs, 0 updates, 0 removals

  • Locking mautic/api-library (3.0.0)
  • Locking psr/log (1.1.4)
    Writing lock file
    Installing dependencies from lock file (including require-dev)
    Package operations: 1 install, 0 updates, 182 removals
  • Downloading mautic/api-library (3.0.0)
  • Removing willdurand/negotiation (3.0.0)
  • Removing willdurand/jsonp-callback-validator (v1.1.0)
  • Removing voku/stop-words (2.0.1)
  • Removing voku/portable-ascii (1.5.6)
  • Removing twilio/sdk (5.42.2)
  • Removing twig/twig (v3.3.2)
  • Removing tightenco/collect (v8.34.0)
  • Removing theofidry/psysh-bundle (4.4.0)
  • Removing symfony/yaml (v4.4.26)
  • Removing symfony/var-exporter (v5.3.3)
  • Removing symfony/var-dumper (v4.4.26)
  • Removing symfony/validator (v4.4.26)
  • Removing symfony/twig-bundle (v4.4.26)
  • Removing symfony/twig-bridge (v4.4.26)
  • Removing symfony/translation-contracts (v2.4.0)
  • Removing symfony/translation (v4.4.26)
  • Removing symfony/templating (v4.4.25)
  • Removing symfony/swiftmailer-bundle (v3.5.2)
  • Removing symfony/string (v5.3.3)
  • Removing symfony/stopwatch (v4.4.25)
  • Removing symfony/service-contracts (v2.4.0)
  • Removing symfony/security-bundle (v4.4.26)
  • Removing symfony/security-acl (v3.0.4)
  • Removing symfony/security (v4.4.26)
  • Removing symfony/routing (v4.4.25)
  • Removing symfony/property-access (v4.4.25)
  • Removing symfony/process (v4.4.26)
  • Removing symfony/polyfill-php81 (v1.23.0)
  • Removing symfony/polyfill-php80 (v1.23.0)
  • Removing symfony/polyfill-php74 (v1.23.0)
  • Removing symfony/polyfill-php73 (v1.23.0)
  • Removing symfony/polyfill-php72 (v1.23.0)
  • Removing symfony/polyfill-mbstring (v1.23.0)
  • Removing symfony/polyfill-intl-normalizer (v1.23.0)
  • Removing symfony/polyfill-intl-idn (v1.23.0)
  • Removing symfony/polyfill-intl-icu (v1.23.0)
  • Removing symfony/polyfill-intl-grapheme (v1.23.0)
  • Removing symfony/polyfill-iconv (v1.23.0)
  • Removing symfony/polyfill-ctype (v1.23.0)
  • Removing symfony/options-resolver (v4.4.25)
  • Removing symfony/monolog-bundle (v3.5.0)
  • Removing symfony/monolog-bridge (v4.4.26)
  • Removing symfony/mime (v5.3.2)
  • Removing symfony/lock (v5.3.2)
  • Removing symfony/intl (v4.4.25)
  • Removing symfony/inflector (v5.3.0)
  • Removing symfony/http-kernel (v4.4.26)
  • Removing symfony/http-foundation (v4.4.26)
  • Removing symfony/http-client-contracts (v2.4.0)
  • Removing symfony/http-client (v4.4.26)
  • Removing symfony/framework-bundle (v4.4.26)
  • Removing symfony/form (v4.4.26)
  • Removing symfony/flex (v1.13.3)
  • Removing symfony/finder (v4.4.25)
  • Removing symfony/filesystem (v4.4.26)
  • Removing symfony/expression-language (v4.4.25)
  • Removing symfony/event-dispatcher-contracts (v1.1.9)
  • Removing symfony/event-dispatcher (v4.4.30)
  • Removing symfony/error-handler (v4.4.26)
  • Removing symfony/dotenv (v4.4.25)
  • Removing symfony/doctrine-bridge (v4.4.25)
  • Removing symfony/deprecation-contracts (v2.4.0)
  • Removing symfony/dependency-injection (v4.4.26)
  • Removing symfony/debug (v4.4.25)
  • Removing symfony/css-selector (v4.4.25)
  • Removing symfony/console (v4.4.26)
  • Removing symfony/config (v4.4.26)
  • Removing symfony/cache-contracts (v2.4.0)
  • Removing symfony/cache (v4.4.26)
  • Removing symfony/asset (v4.4.25)
  • Removing swiftmailer/swiftmailer (v6.2.7)
  • Removing studio-42/elfinder (2.1.59)
  • Removing stack/run (v1.1.0)
  • Removing stack/builder (v1.0.6)
  • Removing sparkpost/sparkpost (2.3.0)
  • Removing simshaun/recurr (v3.1.1)
  • Removing sensio/framework-extra-bundle (v6.1.5)
  • Removing sendgrid/sendgrid (6.2.0)
  • Removing sendgrid/php-http-client (3.14.0)
  • Removing robrichards/xmlseclibs (3.1.1)
  • Removing ramsey/uuid (3.9.3)
  • Removing ralouphie/getallheaders (3.0.3)
  • Removing psy/psysh (v0.10.8)
  • Removing psr/simple-cache (1.0.1)
  • Removing psr/http-message (1.0.1)
  • Removing psr/http-factory (1.0.1)
  • Removing psr/http-client (1.0.1)
  • Removing psr/container (1.1.1)
  • Removing psr/cache (1.0.1)
  • Removing predis/predis (v1.1.7)
  • Removing phpstan/phpdoc-parser (0.5.5)
  • Removing phpseclib/phpseclib (3.0.9)
  • Removing phpoffice/phpspreadsheet (1.18.0)
  • Removing php-http/promise (1.1.0)
  • Removing php-http/message-factory (v1.0.2)
  • Removing php-http/message (1.11.1)
  • Removing php-http/httplug (2.2.0)
  • Removing php-http/guzzle7-adapter (1.0.0)
  • Removing php-http/discovery (1.14.0)
  • Removing php-amqplib/rabbitmq-bundle (2.7.1)
  • Removing php-amqplib/php-amqplib (v3.0.0)
  • Removing pda/pheanstalk (v4.0.3)
  • Removing paragonie/random_compat (v2.0.20)
  • Removing paragonie/constant_time_encoding (v2.4.0)
  • Removing oneup/uploader-bundle (3.1.2)
  • Removing noxlogic/ratelimit-bundle (1.17.0)
  • Removing nikic/php-parser (v4.11.0)
  • Removing myclabs/php-enum (1.8.3)
  • Removing mustangostang/spyc (0.6.3)
  • Removing mtdowling/jmespath.php (2.6.1)
  • Removing mrclay/minify (2.2.0)
  • Removing monolog/monolog (1.26.1)
  • Removing misd/phone-number-bundle (v1.3.2)
  • Removing maxmind/web-service-common (v0.8.1)
  • Removing maxmind-db/reader (v1.10.1)
  • Removing mautic/core-lib (3.2.x-dev), source is still present in app
    Deleting app/ - not deleted
  • Removing matomo/device-detector (4.3.0)
  • Removing markbaker/matrix (2.1.3)
  • Removing markbaker/complex (2.0.3)
  • Removing malkusch/lock (v1.4)
  • Removing maennchen/zipstream-php (2.1.0)
  • Removing lightsaml/symfony-bridge (1.3.0)
  • Removing lightsaml/sp-bundle (1.2.1)
  • Removing lightsaml/lightsaml (1.4.1)
  • Removing leezy/pheanstalk-bundle (4.0.1)
  • Removing league/mime-type-detection (1.7.0)
  • Removing league/flysystem-cached-adapter (1.1.0)
  • Removing league/flysystem (1.1.4)
  • Removing laminas/laminas-code (4.4.2)
  • Removing knplabs/knp-menu-bundle (v3.1.0)
  • Removing knplabs/knp-menu (v3.2.0)
  • Removing knplabs/gaufrette (v0.9.0)
  • Removing kamermans/guzzle-oauth2-subscriber (v1.0.10)
  • Removing joomla/string (1.4.5)
  • Removing joomla/filter (1.3.5)
  • Removing jms/serializer-bundle (3.9.1)
  • Removing jms/serializer (3.13.0)
  • Removing jms/metadata (2.5.0)
  • Removing jbroadway/urlify (1.2.2-stable)
  • Removing ip2location/ip2location-php (7.2.5)
  • Removing intervention/image (2.6.0)
  • Removing helios-ag/fm-elfinder-bundle (10.1)
  • Removing guzzlehttp/psr7 (1.8.2)
  • Removing guzzlehttp/promises (1.4.1)
  • Removing guzzlehttp/oauth-subscriber (0.5.0)
  • Removing guzzlehttp/guzzle (7.3.0)
  • Removing giggsey/locale (1.9)
  • Removing giggsey/libphonenumber-for-php (8.12.28)
  • Removing geoip2/geoip2 (v2.11.0)
  • Removing gaufrette/extras (v0.1.0)
  • Removing gaufrette/aws-s3-adapter (v0.4.0)
  • Removing friendsofsymfony/rest-bundle (3.0.5)
  • Removing friendsofsymfony/oauth2-php (1.3.1)
  • Removing friendsofsymfony/oauth-server-bundle (dev-doctrine-fix 605d207)
  • Removing friendsofphp/proxy-manager-lts (v1.0.5)
  • Removing ezyang/htmlpurifier (v4.13.0)
  • Removing egulias/email-validator (3.1.1)
  • Removing doctrine/sql-formatter (1.1.1)
  • Removing doctrine/persistence (2.2.1)
  • Removing doctrine/orm (2.9.3)
  • Removing doctrine/migrations (2.3.4)
  • Removing doctrine/lexer (1.2.1)
  • Removing doctrine/instantiator (1.4.0)
  • Removing doctrine/inflector (2.0.3)
  • Removing doctrine/event-manager (1.1.1)
  • Removing doctrine/doctrine-migrations-bundle (2.2.2)
  • Removing doctrine/doctrine-fixtures-bundle (3.4.0)
  • Removing doctrine/doctrine-bundle (2.4.2)
  • Removing doctrine/deprecations (v0.5.3)
  • Removing doctrine/dbal (2.13.2)
  • Removing doctrine/data-fixtures (1.4.4)
  • Removing doctrine/common (3.1.2)
  • Removing doctrine/collections (1.6.7)
  • Removing doctrine/cache (2.1.1)
  • Removing doctrine/annotations (1.13.1)
  • Removing composer/package-versions-deprecated (1.11.99.1)
  • Removing composer/installers (v1.11.0)
  • Removing composer/ca-bundle (1.2.10)
  • Removing clue/stream-filter (v1.5.0)
  • Removing barryvdh/elfinder-flysystem-driver (v0.2.1)
  • Removing bandwidth-throttle/token-bucket (2.0.0)
  • Removing aws/aws-sdk-php (3.185.17)
  • Installing mautic/api-library (3.0.0): Extracting archive
    Generating autoload files

My entire Mautic installation broke :frowning:

Hi, I’m facing a similar issue and looking for a solution, did you resolve your issue?