cancel
Showing results for 
Search instead for 
Did you mean: 

Magento 2.3.1 Composer Fatal error when installing Ext

Magento 2.3.1 Composer Fatal error when installing Ext

Trying to install anything on Magento 2.3.0 & 2.3.1 using Composer I get the following error.

 

Does anyone know how to fix this?

 

Fatal error: Uncaught TypeError: Return value of Magento\InventoryComposerInstaller\Plugin_composer_tmp1::initModuleDeployment() must be an instance of Magento\InventoryComposerInstaller\void, none returned in phar:///opt/cpanel/composer/bin/composer/src/Composer/Plugin/PluginManager.php(195) : eval()'d code:69 Stack trace:

0 [internal function]: Magento\InventoryComposerInstaller\Plugin_composer_tmp1->initModuleDeployment(Object(Composer\Script\Event))
1 phar:///opt/cpanel/composer/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php(176): call_user_func(Array, Object(Composer\Script\Event))
2 phar:///opt/cpanel/composer/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php(96): Composer\EventDispatcher\EventDispatcher->doDispatch(Object(Composer\Script\Event))
3 phar:///opt/cpanel/composer/bin/composer/src/Composer/Installer.php(204): Composer\EventDispatcher\EventDispatcher->dispatchScript('pre-update-cmd', true)
4 phar:///opt/cpanel/composer/bin/composer/src/Composer/Command/RequireCommand.php(18 in phar:///opt/cpanel/composer/bin/composer/src/Composer/Plugin/PluginManager.php(195) : eval()'d code on line 69

6 REPLIES 6

Re: Magento 2.3.1 Composer Fatal error when installing Ext

Hi @airsoftsupplydrop 

 

This error can be related to the PHP version compatibility. You need to chack that you are using compatible version with Magento 2.3.X.

 

Here is the list of Magento required php versions:

  1. For Magento 2.3 : PHP 7.1
  2. For Magento 2.2 : PHP 7.1 or PHP 7.0
  3. For Magento 2.1 : PHP 7.1, PHP 7.0 or PHP 5.6
  4. For Magento 2.0 : PHP 7.0, PHP 5.6 or PHP 5.5

 

You need to check your PHP version, and upgrade or downgrade PHP if needed.

You will never make Magento 2 works fine without the good version of PHP.

 

Thanks

--
If my answer is useful, please Accept as Solution & give Kudos

Re: Magento 2.3.1 Composer Fatal error when installing Ext

im running PHP 7.2.18 (cli) (built: May 19 2019 18:16:07) ( NTS )

Re: Magento 2.3.1 Composer Fatal error when installing Ext

hello. i have installed a Magento 2.3.4 version and trying to install the data migration tool version 2.3.4. After launching the commands:

 

composer config repositories.magento composer https://repo.magento.com

composer require magento/data-migration-tool:2.3.4

 

i have the same output:

 

Fatal error: Uncaught TypeError: Return value of Magento\InventoryComposerInstaller\Plugin_composer_tmp1::initModuleDeployment() must be an instance of Magento\InventoryComposerInstaller\void, none returned in phar:///opt/cpanel/composer/bin/composer/src/Composer/Plugin/PluginManager.php(195) : eval()'d code:69

Stack trace:

#0 [internal function]: Magento\InventoryComposerInstaller\Plugin_composer_tmp1->initModuleDeployment(Object(Composer\Script\Event))

#1 phar:///opt/cpanel/composer/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php(176): call_user_func(Array, Object(Composer\Script\Event))

#2 phar:///opt/cpanel/composer/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php(96): Composer\EventDispatcher\EventDispatcher->doDispatch(Object(Composer\Script\Event))

#3 phar:///opt/cpanel/composer/bin/composer/src/Composer/Installer.php(205): Composer\EventDispatcher\EventDispatcher->dispatchScript('pre-update-cmd', true)

#4 phar:///opt/cpanel/composer/bin/composer/src/Composer/Command/RequireCommand.php(20 in phar:///opt/cpanel/composer/bin/composer/src/Composer/Plugin/PluginManager.php(195) : eval()'d code on line 69

 

I have tried to change from PHP 7.3 to 7.2 but no results. Anybody has solved this issue? regards

Re: Magento 2.3.1 Composer Fatal error when installing Ext

i have the same problem as mention by the user spareparts, i dont know if anyone has found a solution.


@spareparts wrote:

hello. i have installed a Magento 2.3.4 version and trying to install the data migration tool version 2.3.4. After launching the commands:

 

composer config repositories.magento composer https://repo.magento.com

composer require magento/data-migration-tool:2.3.4

 

i have the same output:

 

Fatal error: Uncaught TypeError: Return value of Magento\InventoryComposerInstaller\Plugin_composer_tmp1::initModuleDeployment() must be an instance of Magento\InventoryComposerInstaller\void, none returned in phar:///opt/cpanel/composer/bin/composer/src/Composer/Plugin/PluginManager.php(195) : eval()'d code:69

Stack trace:

#0 [internal function]: Magento\InventoryComposerInstaller\Plugin_composer_tmp1->initModuleDeployment(Object(Composer\Script\Event))

#1 phar:///opt/cpanel/composer/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php(176): call_user_func(Array, Object(Composer\Script\Event))

#2 phar:///opt/cpanel/composer/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php(96): Composer\EventDispatcher\EventDispatcher->doDispatch(Object(Composer\Script\Event))

#3 phar:///opt/cpanel/composer/bin/composer/src/Composer/Installer.php(205): Composer\EventDispatcher\EventDispatcher->dispatchScript('pre-update-cmd', true)

#4 phar:///opt/cpanel/composer/bin/composer/src/Composer/Command/RequireCommand.php(20 in phar:///opt/cpanel/composer/bin/composer/src/Composer/Plugin/PluginManager.php(195) : eval()'d code on line 69

 

I have tried to change from PHP 7.3 to 7.2 but no results. Anybody has solved this issue? regards



 


@spareparts wrote:

hello. i have installed a Magento 2.3.4 version and trying to install the data migration tool version 2.3.4. After launching the commands:

 

composer config repositories.magento composer https://repo.magento.com

composer require magento/data-migration-tool:2.3.4

 

i have the same output:

 

Fatal error: Uncaught TypeError: Return value of Magento\InventoryComposerInstaller\Plugin_composer_tmp1::initModuleDeployment() must be an instance of Magento\InventoryComposerInstaller\void, none returned in phar:///opt/cpanel/composer/bin/composer/src/Composer/Plugin/PluginManager.php(195) : eval()'d code:69

Stack trace:

#0 [internal function]: Magento\InventoryComposerInstaller\Plugin_composer_tmp1->initModuleDeployment(Object(Composer\Script\Event))

#1 phar:///opt/cpanel/composer/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php(176): call_user_func(Array, Object(Composer\Script\Event))

#2 phar:///opt/cpanel/composer/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php(96): Composer\EventDispatcher\EventDispatcher->doDispatch(Object(Composer\Script\Event))

#3 phar:///opt/cpanel/composer/bin/composer/src/Composer/Installer.php(205): Composer\EventDispatcher\EventDispatcher->dispatchScript('pre-update-cmd', true)

#4 phar:///opt/cpanel/composer/bin/composer/src/Composer/Command/RequireCommand.php(20 in phar:///opt/cpanel/composer/bin/composer/src/Composer/Plugin/PluginManager.php(195) : eval()'d code on line 69

 

I have tried to change from PHP 7.3 to 7.2 but no results. Anybody has solved this issue? regards


 

Re: Magento 2.3.1 Composer Fatal error when installing Ext

Hello @airsoftsupplydrop ,

 

Please try to add composer.phar in root of magento project and then try with following command instead of using composer require or composer update 

 

php -dmemory_limit=6G composer.phar require
php -dmemory_limit=6G composer.phar update

 

----

Problem solved? Click Accept as Solution!

Re: Magento 2.3.1 Composer Fatal error when installing Ext

Hello ,  i am not able to  understand, would you please little eleborate it please.