Magento 2 – di:compile Fehler

Von Christian am 17. März 2022

Je nach Systemupdates kommt es vor, dass dieser unangenehme Fehler auftaucht

The requested class did not generate properly, because the 'generated' directory permission is read-only. If --- after running the 'bin/magento setup:di:compile' CLI command when the 'generated' directory permission is set to write --- the requested class did not generate properly, then you must add the generated class object to the signature of the related construct method, only.

Um diesen zum umgehen müsstet ihr einmal alle Rechte korrekt setzen.
Führt diesen SSH Befehl im Verzeichnis eures Magento 2 aus:

find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;
find ./var -type d -exec chmod 777 {} \;
find ./pub/media -type d -exec chmod 777 {} \;
find ./pub/static -type d -exec chmod 777 {} \;
chmod 777 ./app/etc
chmod 644 ./app/etc/*.xml
chown -R www-data:www-data /var/www/html/magento2
chmod u+x bin/magento
echo given write permissions to bin/magento DONE!
Hosting Pilot Support Telefon

Telefonische Beratung

+49 2131 77 69 59 5
Hosting Hilfe

Online Hilfe