Why am I receiving error messages "Class does not exist" when running DI compile?

I removed some modules using the node replace in my composer.json, as you can see below.

 "replace": {
    "amzn/amazon-pay-and-login-magento-2-module": "*",
    "amzn/amazon-pay-and-login-with-amazon-core-module": "*",
    "amzn/amazon-pay-module": "*",
    "amzn/amazon-pay-sdk-php": "*",
    "amzn/login-with-amazon-module": "*",
    "magento/module-braintree": "*",
    "magento/module-braintree-graph-ql": "*",
    "braintree/braintree_php": "*",
    "braintree/braintree": "*",
    "dotmailer/dotmailer-magento2-extension": "*",
    "dotmailer/dotmailer-magento2-extension-package": "*",
    "dotmailer/dotmailer-magento2-extension-enterprise": "*",
    "klarna/m2-payments": "*",
    "klarna/module-core": "*",
    "klarna/module-kp": "*",
    "klarna/module-ordermanagement": "*",
    "vertex/product-magento-module": "*",
    "vertex/module-tax": "*",
    "vertex/sdk": "*",
    "yotpo/magento2-module-yotpo-reviews": "*",
    "yotpo/magento2-module-yotpo-reviews-bundle": "*"

I received many issues related with those modules, when I try to run the setup:di:compile I see a message about Vertex class, which is not installed anymore, when I try to run bin/magento I receive an error message about the Authorize.net.

Magento 2 Class Vertex\Tax\Model\Cache\Type does not exist

Why is it happening and how could I solve it?

1 Answer 1


It's happening because of the Redis cache, run these commands to flush it and try again.

redis-cli -n 0 flushall
composer install
bin/magento setup:di:compile
  • i'm having the same issue with another extension. i'm using siteground cloud hosting, but i dont have redis cache. any idea how i can solve it? Commented Mar 17, 2021 at 22:50

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.