Domanda

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?

È stato utile?

Soluzione

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.

Altri suggerimenti

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

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