skip to Main Content

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


  1. 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.

    “We are aware of this issue that came with Magento 2.2.4 , and we already fixed it. The fix will be included in the next products releases next week, after all tests are completed.”

    Login or Signup to reply.
  2. 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

     <type name="PsrLogLoggerInterface">
             <plugin name="weltpixel-backend-logger"
                     type="WeltPixelBackendPluginLogger" sortOrder="15"/>
     </type>
    

    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

    Login or Signup to reply.
  3. First clear all the cache by running following command in terminal:

    rm -rf var/di/* var/generation/* var/cache/* var/page_cache/* var/view_preprocessed/* var/composer_home/cache/*
    

    Then try the following:

    php bin/magento setup:di:compile
    php bin/magento setup:upgrade
    php bin/magento setup:static-content:deploy -f
    

    Hopefully it will solve your issue.

    Login or Signup to reply.
  4. 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 :

    composer install
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search