1

Hi i am installing Magento 2.3.5 but getting error on di:compile command

MiBErrors during compilation:
Dotdigitalgroup\Email\Model\Apiconnector\EngagementCloudAddressBookApi
Incompatible argument type: Required type: \Dotdigitalgroup\Email\Logger\Logger. Actual type: \Dotdigitalgroup\Email\Helper\File; File:
/home/stylekulcom/public_html/vendor/dotmailer/dotmailer-magento2-

extension/Model/Apiconnector/EngagementCloudAddressBookApi.php

Total Errors Count: 1

enter image description here

4
  • did you tried removing generated folder manually?
    – Pramod
    Aug 13 '20 at 9:38
  • Yes I removed it but still getting same error
    – OBAID
    Aug 13 '20 at 9:38
  • then you should check that helper file
    – Pramod
    Aug 13 '20 at 9:42
  • try replacing the code with the code am posting
    – Pramod
    Aug 13 '20 at 9:44
3

Replace your magento module with this one

https://github.com/dotmailer/dotmailer-magento2-extension

8
  • Let me try this code.
    – OBAID
    Aug 13 '20 at 9:48
  • same error with this code as well.
    – OBAID
    Aug 13 '20 at 9:50
  • 1
    github.com/dotmailer/dotmailer-magento2-extension try replacing your complete module with this
    – Pramod
    Aug 13 '20 at 10:00
  • BTW this file does not exists in this module dotmailer-magento2-extension/Model/Apiconnector/EngagementCloudAddressBookApi.php
    – OBAID
    Aug 13 '20 at 10:11
  • I have deleted magento module added this one and it worked . Thanks man for your support.
    – OBAID
    Aug 13 '20 at 10:18
1

Run this commands, deleting files/module manually not a good approach.

  composer remove dotmailer/dotmailer-magento2-extension   
  composer require dotmailer/dotmailer-magento2-extension -vvv
  mv generated generated_dotfix
  php bin/magento setup:upgrade
  php bin/magento setup:di:compile
  php bin/magento s:s:d -s
0

I am having this same issue on Magento 2.3.5, above solution hasnt worked even when I disable the dotmailer-magento2-extension

public_html$ php bin/magento setup:di:compile

Compilation was started.
Interception cache generation... 6/8 [=====================>------]  75% 44 secs 512.0 MiBErrors during compilation:
        Dotdigitalgroup\Email\Model\Apiconnector\EngagementCloudAddressBookApi
                Incompatible argument type: Required type: \Dotdigitalgroup\Email\Logger\Logger. Actual type: \Dotdigitalgroup\Email\Helper\File; File:
/public_html/vendor/dotmailer/dotmailer-magento2-extension/Model/Apiconnector/EngagementCloudAddressBookApi.php

Total Errors Count: 1
0

Run below commands on magento root:

rm -rf composer.lock
rm -rf generated/*
rm -rf vendor/*
composer update
php bin/magento s:up
php bin/magento s:d:c
php bin/magento s:s:d
php bin/magento c:f
php bin/magento c:c
0

1)delete the older version files at /vendor/dotmailer/dotmailer-magento2-extension

2)download the latest version at https://github.com/dotmailer/dotmailer-magento2-extension

3)extract and upload the latest version files to /vendor/dotmailer/dotmailer-magento2-extension

re-execute the commands

php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy -f
php bin/magento cache:flush

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.