1

I have installed Magento 2 on my ubuntu 14.04 virtual machine and when I created a new module and tried to do setup:upgrade after enabling it, it shows following error.

root@ubuntu:/var/www/html/Magento# php bin/magento setup:upgrade
Cache cleared successfully
File system cleanup:
/var/www/html/Magento/var/generation/Composer
/var/www/html/Magento/var/generation/Magento
/var/www/html/Magento/var/generation/Symfony
The directory '/var/www/html/Magento/var/di/' doesn't exist - skipping cleanup
Updating modules:
Schema creation/updates:
Module 'Itdeation_Catalog':
Schema post-updates:
Module 'Itdeation_Catalog':
Data install/update:
Module 'Itdeation_Catalog':
Installing data... PHP Fatal error:  Cannot instantiate interface Magento\Eav\Model\Entity\Setup\PropertyMapperInterface in /var/www/html/Magento/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php on line 73

Fatal error: Cannot instantiate interface Magento\Eav\Model\Entity\Setup\PropertyMapperInterface in /var/www/html/Magento/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php on line 73

Please help!

  • you have issue inside Itdeation_Catalog module, please check your setup folder installschema.php file – Rakesh Jesadiya Oct 12 '16 at 10:58
5

First you can use this command for compiling di

php bin/magento setup:di:compile

After finish of compilation if not getting any error delete di folder from /var/www/html/Magento/var/ and then run setup upgrade.

1

1.This is interface problem mean that in namespace\modulename\Api\Data\yourInterface should have some problems.

2.When your module try to install data mean when InstallData.php run which is connected through your model and [yourModel] is connected with [yourInterface] so you need to debug these files.

3.As you listed your error is showing :- Installing data... PHP Fatal error so you need to figure out three file first
1.Api
2.Model
3.InstallData.php

Make sure you have added these two namespaces in your model.

use namespace\yourModule\Model\yourModelName;
use namespace\yourModule\Model\yourModelNameFactory;

If you still face any problem then let me know I will try to solve it.

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.