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?

sv3n
  • 11,657
  • 7
  • 40
  • 73
Alin Lupoiu
  • 2,662
  • 5
  • 40
  • 76

3 Answers3

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!

Alin Lupoiu
  • 2,662
  • 5
  • 40
  • 76
  • 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 05 '17 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 05 '17 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 '18 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.

Jason
  • 538
  • 7
  • 19
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

Sourav
  • 1,298
  • 8
  • 16