Posted on

“Type Error occurred when creating object” persists

I am getting the following error message:

main.CRITICAL: Type Error occurred when creating object: VendorCartUpdatePluginMinicartImage, Argument 1 passed to VendorCartUpdatePluginMinicartImage::__construct() must be an instance of VendorCartUpdateModelDynamicImage, instance of VendorCartInitialModelDynamicImage given, called in /home/coriolan/public_html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 121 [] []

Indeed, Vendor/CartInitial was the initial module that was used, but I’ve changed it to Vendor/CartUpdate in the past few days. However, there is strange behavior related to it. When I run the CLI commands and use rm -rf generated/* it works, but after a few hours, it does not work anymore and I get the same error again.

What can I do to avoid this problem?

Leave a Reply

Your email address will not be published.