Magento 2 - Non ci sono comandi definiti nello spazio dei nomi "Setup" su Windows [Duplicate]

magento.stackexchange https://magento.stackexchange.com/questions/103774

  •  29-09-2020
  •  | 
  •  

Domanda

Ho un problema quando eseguo questo comando:

php bin/magento setup:upgrade
.

Display Error:

.

[InvalidArgumentException]
Non ci sono comandi definiti nel "Setup" Spazio dei nomi.

Ho trovato alcune risposte ma non nel mio caso (corro in Windows 7 e XAMPP).
Non ci sono comandi definiti nel " Setup "Namespace: magento 2

sul display frontend:
Inserisci la descrizione dell'immagine qui L'ultima volta, ho fissato è il sistema il codice del pool ha errori con il mio modulo. E ora rimuovo tutti i miei moduli ma errore fino al display. Qualcuno usato per risolvere questo problema, puoi dirmi come risolvere questo problema?

Quando eseguo il comando per installare nuovamente il compositore, restituisce l'errore qui sotto:
Inserisci la descrizione dell'immagine qui

È stato utile?

Soluzione

Eseguire questo comando:

php bin/magento list
.

Quando tutto funziona correttamente, questo dovrebbe elencare tutti i possibili comandi nell'interfaccia della riga di comando Magento 2.Tuttavia, nel caso in cui qualcosa stia andando male, questo ti darà anche un messaggio di errore molto più descrittivo su come e perché è fallito.

Questo potrebbe essere il risultato di un file di moduli Composer .json non valido, tra le altre cose.

Vedi anche: https://magento.stackexchange.com/a/91696/1905

Altri suggerimenti

Also happens when the module name in module.xml does not match with path based namespace. Please check your module name again: code/Vendor/myModuleName/etc/module.xml

We can read more here: https://gist.github.com/bka/d44fb33d1eaf780e1b76

I had the same issue and I followed several suggested stupid suggestions to fix the problem like delete my composer.json something like that. But those didn't fix my problem. Today, I faced the problem again and I tried a new approach to trace the problem. All details and screenshot are in my personal blog post http://david.firstbiz.cc/blog_detail.php?id=115 I described my steps here:

1. for CLI, please append "-vvv" and it will display function trace paths
2. try to load any product page and check your web server error log and you will be able to see more details.
3. the class name and the filename should be same (*this is the case I faced)

If anyone have dependencies (especially coming from custom modules) in you CLI class, you have to check all of the class for possible problems. If somewhere you are playing around with RequestInterface it can cause problem - but don't know why.

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