Question

I used Magento 2 stable version. when I run Magento setup:upgrade, following error occurred.

[InvalidArgumentException]
There are no commands defined in the "setup" namespace.

And when I run Magento indexer:reindex, also error display

[InvalidArgumentException]
There are no commands defined in the "indexer" namespace.

How to resolve this? Any other solution to reindex without CLI?

Était-ce utile?

La solution

Reindex Magento 2 using the command.

Now You have to enter this command in your root installation folder.

sudo php -f ./bin/magento indexer:reindex

please clear folders di, page_cache, view_process , cache.

restart your command prompt and try to re-index.

I hope this will help you.

Autres conseils

In my case, I had wrong DB info in app/etc/env.php

Licencié sous: CC-BY-SA avec attribution
Non affilié à magento.stackexchange
scroll top