Got error during compilation after upgrade in magento 2.2.3

Interception cache generation... 6/7 [========================>---] 85% 42 secs 342.0 MiBErrors during compilation: Magento\Backend\Model\View\Layout\GeneratorPool Incompatible argument type: Required type: \Magento\Framework\View\Layout\Condition\ConditionFactory. Actual type: \Magento\Framework\App\Config\ScopeConfigInterface; File: /chroot/home/discount/m223/html/vendor/magento/module-backend/Model/View/Layout/GeneratorPool.php

Total Errors Count: 1

[Magento\Framework\Validator\Exception] Error during compilation

AND also, it's changed Cache folder permission 777 to 775 during compile.

  • Remove var folder and run command of compile
    – SNS
    Commented Apr 16, 2018 at 5:25

2 Answers 2


If you upgrade Magento older version to Magento 2.2.3 and you fetching same error in compile then below step you should follow to resolve this error.

Magento older version have 2 directories and 2 files in this path


  1. Filter
  2. Reader
  3. Builder.php
  4. GeneratorPool.php

And Magento version 2.2.3 have 1 directory and 2 files

  1. Reader
  2. Builder.php file
  3. StructureManager.php

So after merge files and folder, you should delete "filter" folder and "GeneratorPool.php" from Magento version 2.2.3 on this path.


then run the compile command

then no error will show.

  • I resolved this error on my Magento website. Commented Apr 20, 2018 at 9:24

Can you please confirm you have deleted the below mentioned file from your server? If not then delete it and see if it resolves the problem because this file was removed in 2.2.3 version and causes trouble when you run compile command when the file exists


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.