mirasvit / module-profiler

Magento 2 Profiler
https://mirasvit.com/
Open Software License 3.0
133 stars 36 forks source link

Cannot run bin/magento commands after installing #9

Closed matt-bailey closed 7 years ago

matt-bailey commented 7 years ago

After installing the module I get errors when trying to use any of the bin/magento commands, for example [InvalidArgumentException] There are no commands defined in the "setup" namespace.

I have tried clearing the cache and code generation directories, but this has no effect. If I remove the module I no longer get the errors.

The site is running Magento 2 CE 2.1.2. In composer.json I'm requiring "mirasvit/module-profiler": "dev-master" from the https://github.com/mirasvit/module-profiler repository.

If I run php bin/magento list I get a bit more useful info:

We're sorry, an error occurred. Try clearing the cache and code generation directories. By default, they are: var/cache, var/di, var/generation, and var/page_cache.

[Zend\ServiceManager\Exception\ServiceNotCreatedException]
  An abstract factory could not create an instance of magentosetupconsolecommandconfigsetcommand(alias: Magento\Setup\Console\Command\ConfigSetCommand).

[Zend\ServiceManager\Exception\ServiceNotCreatedException]
  An exception was raised while creating "Magento\Setup\Console\Command\ConfigSetCommand"; no instance returned

[Magento\Framework\Exception\FileSystemException]
  Cannot read contents from file "/var/www/strax/vendor/mirasvit/module-profiler/etc/module.xml" Warning!file_get_contents(/var/www/strax/vendor/mirasvit/module-profiler/etc/module.xml): failed to open stream: No such file or directory

Is this a bug, or am I doing something wrong perhaps?

adrok commented 7 years ago

I just fixed this bug.

Please run composer update mirasvit/module-profiler

matt-bailey commented 7 years ago

That's great, I can confirm the problem is solved now. Thanks.