I can not install or uninstall magento 2 plugins / modules. I have the default theme Luma, and magento 2.2.4.

I'm in developer mode. Whenever I try to install a plugin, or uninstall a plugin by SSH or by Magento backend, I get an error.

Warning: include(../public_html/generated/metadata/global.php): failed to open stream: No such file or directory in ../public_html/vendor/magento/framework/App/ObjectManager/ConfigLoader/Compiled.php on line 31

Warning: include(): Failed opening '../public_html/generated/metadata/global.php' for inclusion (include_path='../public_html/generated/code:../public_html/generated/code:../public_html/vendor/magento/zendframework1/library:.:/usr/local/php71/lib/php') in ../public_html/vendor/magento/framework/App/ObjectManager/ConfigLoader/Compiled.php on line 31

Fatal error: Uncaught TypeError Argument: 1 passed to Magento\Framework\ObjectManager\ObjectManager::configure() must be of the type array, boolean given, called in ../public_html/vendor/magento/framework/App/ObjectManager/Environment/Compiled.php on line 108 and defined in ../public_html/vendor/magento/framework/ObjectManager/ObjectManager.php:82 Stack trace: #0 ../public_html/vendor/magento/framework/App/ObjectManager/Environment/Compiled.php(108): Magento\Framework\ObjectManager\ObjectManager->configure(false) #1 ../public_html/vendor/magento/framework/App/ObjectManagerFactory.php(187): Magento\Framework\App\ObjectManager\Environment\Compiled->configureObjectManager(Object(Magento\Framework\Interception\ObjectManager\Config\Compiled), Array) #2 ../public_html/vendor/magento/framework/App/Bootstrap.php(208): Magento\Framework\App\ObjectManagerFactory->create(Array) #3 in ../public_html/vendor/magento/framework/ObjectManager/ObjectManager.php on line 82

These errors are only solved when I run bin/magento setup:di:compile. After I run that, no changes are made, my new plugin is not showing, or when uninstalling: is still showing.

I have tried cache flush/clean, setup:upgrade, permissions are 755 on generated dir. I don't know why I should run di:compile as i'm in developer mode, but more importantly: why I can not install new plugins/uninstall plugins.

What should I do?

  • Plugin like language pack from Mageplaza, ho-nl dutch translation and other fully supported Magento 2 plugins. – karstenm May 12 '18 at 12:31

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.