11

I tried to install MailChimp module for Magento 2.

After I put all the files in the app/code/[vendor]/[module] and I run php bin/magento setup:upgrade, I received this error:

  [ReflectionException]
  Class Mailchimp does not exist

I tried with several version and for all of them, I received the same thing.

I got the extension from https://marketplace.magento.com/. So I think this should work fine.

Does anyone know how can I solve this issue?

3 Answers 3

17

It seems that this module need a special library. If we take a look into the composer.json file located in the module files we can find that he required this library :

 "require" : {
    "ebizmarts/mailchimp-lib": "3.0.*"
  }

So in my case the only solution was to install this library via composer and then install the module also via composer.

To install via composer you need to run :

composer require ebizmarts/mailchimp-lib

composer require mailchimp/mc-magento2

If this will not work try to do the same thing in magento composer. and then run php bin/magento setup:upgrade

i hope this will help!

3
  • Hi, I followed these instructions and previous to installing the Mailchimp extension, I had their magemonkey extension installed. AFter requiring the lib, I got the below error and now I can't access my admin panel!
    – Jason
    Oct 5, 2017 at 21:35
  • Package ebizmarts/magento2-magemonkey's source key should be specified as {"type": ..., "url": ..., "reference": ...}, {"type":"git","url":"https:\/\/github.com\/ebizmarts\/magento2-magemonkey.git","reference":null} given.
    – Jason
    Oct 5, 2017 at 21:36
  • While executing the "composer require ebizmarts/mailchimp-lib" removed the some extension(Mirasvit Followup email) and website through the error.
    – Rat
    May 22, 2018 at 11:10
2

After about 9 hours of reading through the internet and trying to find a solution, I ended up deleting the contents of my Vendor folder (but NOT .htaccess file) and running composer update command

composer update

This took away the error and I was able to delete the Magemonkey files and redownload the Ebizmarts library file:

composer require ebizmarts/mailchimp-lib

And then enable the Mailchimp extension. THis was the biggest pain in the ass so I hope this helps someone in the future.

Just a note, after doing all this and running the upgrade and compile, you may need to reset permissions on your magento install, as I had to.

2

I have fixed same issue with composer command.

composer require ebizmarts/mailchimp-lib

You can also download zip folder of library.

https://api.github.com/repos/ebizmarts/mailchimp-lib/zipball/293960203ff1d834af5b2f2726f03063494a2265

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.