Question

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?

Was it helpful?

Solution

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
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top