I am having issue with few extension installation on Magento EE 2.2 production server. Extension works fine on my local system but when i push code to production it gives error Fatal error:

Uncaught Error: Cannot instantiate interface Vendor\Module\Api\StockistRepositoryInterface

I tried 2 methods for module installation:

Method 1 ( using manual upload ): copy module into app/code and then pushed the code to server, deployment goes fine and in system->configurations i am able to save configurations but when i try to access module sections ( to add entries ) it gives error.

Fatal error: Uncaught Error: Cannot instantiate interface Vendor\Module\Api\StockistRepositoryInterface in /app/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:111 Stack trace: #0 /app/vendor/magento/framework/ObjectManager/Factory/Compiled.php(108): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('Vendor\Module...', Array) #1 /app/vendor/magento/framework/ObjectManager/Factory/Compiled.php(150): Magento\Framework\ObjectManager\Factory\Compiled->create('Limesharp\Stock...') #2 /app/vendor/magento/framework/ObjectManager/Factory/Compiled.php(79): Magento\Framework\ObjectManager\Factory\Compiled->get('Limesharp\Stock...') #3 /app/vendor/magento/framework/ObjectManager/ObjectManager.php(56): Magento\Framework\ObjectManager\Factory\Compiled->create('Limesharp\Stock...', Array) #4 /app/vendor/magento/framework/App/ActionFactory.php(40): Magento\Framework\ObjectManager\ObjectManager->create('Limesharp\Stock...') #5 /app/vendor/magento/framework/App/Router/Base.php(297): Mage in /app/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 111

Method 2 ( using composer ) :

Run command composer require vendor/module-name

After composer is installed and updated , pushed only composer files to production server, deployment goes fine but still getting same error. ( able to save configurations but can't add entries ).

NOTE : before pushing composer files i deleted module folder from app/code.

This issue is with couple of modules and don't know how to fix that issue. module work fine on local but not on production server.

help will be highly appreciated.

  • Its a bug with the module you have. The StockistRepositoryInterface probably does not have any preference to a model. – André Ferraz Jan 30 '18 at 11:34
  • I have checked that module's di.xml file there is no issue , secondly same issue is with couple of other modules – Naveed Asim Jan 30 '18 at 11:40
  • Have you cleared you generation folder? They have moved from var/di to root-folder/generation. – André Ferraz Jan 30 '18 at 13:24
  • Yes did that too. – Naveed Asim Jan 30 '18 at 17:13

Your Answer

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

Browse other questions tagged or ask your own question.