Domanda

I can run php bin/magento on my remote server, but locally, when i attempt to run it, I get the following errors:

D:\Magento2>php bin/magento
PHP Fatal error:  Cannot instantiate interface Magento\Framework\Console\CommandListInterface in D:\Magento2\vendor\magento\framework\ObjectManager\Factory\Dyn
PHP Stack trace:
PHP   1. {main}() D:\Magento2\bin\magento:0
PHP   2. Magento\Framework\Console\Cli->__construct() D:\Magento2\bin\magento:22
PHP   3. Symfony\Component\Console\Application->__construct() D:\Magento2\vendor\magento\framework\Console\Cli.php:83
PHP   4. Magento\Framework\Console\Cli->getDefaultCommands() D:\Magento2\vendor\symfony\console\Symfony\Component\Console\Application.php:91
PHP   5. Magento\Framework\Console\Cli->getApplicationCommands() D:\Magento2\vendor\magento\framework\Console\Cli.php:112
PHP   6. Magento\Framework\ObjectManager\ObjectManager->create() D:\Magento2\vendor\magento\framework\Console\Cli.php:140
PHP   7. Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create() D:\Magento2\vendor\magento\framework\ObjectManager\ObjectManager.php:57

Fatal error: Cannot instantiate interface Magento\Framework\Console\CommandListInterface in D:\Magento2\vendor\magento\framework\ObjectManager\Factory\Dynamic\

Call Stack:
    0.0002     124312   1. {main}() D:\Magento2\bin\magento:0
    0.0320     845168   2. Magento\Framework\Console\Cli->__construct() D:\Magento2\bin\magento:22
    1.0122   12222368   3. Symfony\Component\Console\Application->__construct() D:\Magento2\vendor\magento\framework\Console\Cli.php:83
    1.0180   12586728   4. Magento\Framework\Console\Cli->getDefaultCommands() D:\Magento2\vendor\symfony\console\Symfony\Component\Console\Application.php:91
    1.0189   12625928   5. Magento\Framework\Console\Cli->getApplicationCommands() D:\Magento2\vendor\magento\framework\Console\Cli.php:112
    4.1712   39443128   6. Magento\Framework\ObjectManager\ObjectManager->create() D:\Magento2\vendor\magento\framework\Console\Cli.php:140
    4.1712   39443384   7. Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create() D:\Magento2\vendor\magento\framework\ObjectManager\ObjectManager

I'm working in developer mode, with all caches off. This started occuring after upgrading from 2.0.X to 2.1.0rc2

It seems like Symfony isn't working properly...

È stato utile?

Soluzione 2

This may not be the best answer, but i've found that updating the remote server, then synchronizing the files to my local machine cleared up any issues.

Altri suggerimenti

  • Check if \Magento\Framework\Console\CommandListInterface exists as it is called in lib/internal/Magento/Framework/Console/Cli.php:140
  • Check \Magento\SampleData\Console\CommandList as it extends Magento\Framework\Console\CommandListInterface that may not exist.
  • Check app/etc/di.xml if it has correct preference for Magento\Framework\Console\CommandListInterface.
  • Clean cache.

Can happen due to permissions, try:

chmod 777 -R .

(Or more secure equivalent) in the application directory and re-run your command.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a magento.stackexchange
scroll top