I have installed Magento 2.2.4 with composer. Everything is working but when I am running this command.
php bin/magento setup:di:compile
It is giving me an error
**[RuntimeException] Source class "MagentoPaymentModelMethodVirtual" forMagentoPaymentModelMethodVirtualLogger" generation does not exist.**
I have cleared all cache and removed these folders also
rm -rf var/di/* var/generation/* var/cache/* var/log/* var/page_cache/* var/session/* var/view_preprocessed/* pub/static/*
Your help will be appreciated. Thanks in advance
4
Answers
ditto. i also see a similar issue logged on https://github.com/magento/magento2/issues/14950
note: var/generation has been moved to generated/code and var/di has been moved to generated/metadata in m2.2
edit: i’ve also contacted WeltPixel following some comments on github and they have said.
This issue occurs only when you have a plugin for class “PsrLogLoggerInterface”
In our case, it was in WeltPixel’s extension
app/code/WeltPixel/Backend/etc/di.xml
Removing the content
solved the problem.
Just search your file system for text
name=”PsrLogLoggerInterface”
and remove the plugin temporarily until the time we have an official solution on GitHub issue https://github.com/magento/magento2/issues/14950
First clear all the cache by running following command in terminal:
Then try the following:
Hopefully it will solve your issue.
1、note: var/generation has been moved to generated/code and var/di has been moved to generated/metadata in m2.2, so we only delete generation.
rm -rf generation/* var/cache/* var/page_cache/* var/view_preprocessed/* var/composer_home/cache/*
2、try :